1ce748424f8a88b45704e019a99cdc82c8271701
Benjamin Renard Initial commit

Benjamin Renard authored 12 years ago

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

Benjamin Renard authored 12 years ago

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

Benjamin Renard authored 12 years ago

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

Benjamin Renard authored 12 years ago

16) [ ! -n "$TYPE" -o "$TYPE" == "-h" -o "$TYPE" == "--help" ] && TYPE=full