1ce748424f8a88b45704e019a99cdc82c8271701
Benjamin Renard Initial commit

Benjamin Renard authored 12 years ago

1) #!/bin/bash
2) 
3) BCKP_DUMP_BIN=/usr/share/backuppc/bin/BackupPC_dump
4) BCKP_DIR=/var/lib/backuppc/pc
5) 
6) MACHINE="$1"
7) TYPE=$2
8) DEBUG=0
9) [ "$3" == "-d" ] && DEBUG=1
10) 
11) function usage() {
12) 	[ -n "$1" ] && echo "[ERROR] $1" > /dev/stderr && echo
Benjamin Renard add -h/--help parameter on...

Benjamin Renard authored 12 years ago

13) 	echo "usage : $0 [-h|--help] [MACHINE] [incr|FULL] [-d]"
Benjamin Renard Initial commit

Benjamin Renard authored 12 years ago

14) 	[ -n "$1" ] && exit 1 || exit 0
15) }
16) 
Benjamin Renard add -h/--help parameter on...

Benjamin Renard authored 12 years ago

17) [ ! -n "$MACHINE" -o "$MACHINE" == "-h" -o "$MACHINE" == "--help" ] && usage