a3fbfbd2616ee8694175adedf6f1337335511abe
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

Benjamin Renard authored 12 years ago

16) [ "$TYPE" == "-h" -o "$TYPE" == "--help" ] && usage
17)