diff --git a/README.md b/README.md index 1a904b1..6e48db6 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,24 @@ The included workflow that actually performs the backup can be manually run thro ## Usage ```sh -$ /bin/bash scripts/backup.sh -r -b -d [-n ] [-v] [-x] +$ scripts/backup.sh -h +Usage: scripts/backup.sh [-r ] [-b ] [-d ] [-n ] [-v] [-x] [-i] [-h] + +Ex: scripts/backup.sh \ + -r https://github.com/descartes-underwriting/devops-technical-test-data.git \ + -b main \ + -d /home/mycroft/dev/private-backup/data + +Available flags: + -r - set remote repository url (suffixed by .git) to backup + -b - branch to backup + -d - where to backup; relative or absolute + -n - number of commit to backup (default: unlimited) + -i - ignore tracking information - to restart from scratch + -v - verbose mode + -x - debug mode + -h - this help + ``` Ex: diff --git a/scripts/backup.sh b/scripts/backup.sh old mode 100644 new mode 100755 index 580704e..61d828b --- a/scripts/backup.sh +++ b/scripts/backup.sh @@ -45,8 +45,22 @@ do set -x ;; h) - echo "Usage: $0 [-r ] [-b ] [-d ] [-n ] [-v] [-x] [-h]" - echo "Ex: $0 -r $REPOSITORY -b $BRANCH -d $DATA_DIR" + echo "Usage: $0 [-r ] [-b ] [-d ] [-n ] [-v] [-x] [-i] [-h]" + echo + echo "Ex: $0 \\" + echo " -r $REPOSITORY \\" + echo " -b $BRANCH \\" + echo " -d $DATA_DIR" + echo + echo "Available flags:" + echo " -r - set remote repository url (suffixed by .git) to backup" + echo " -b - branch to backup" + echo " -d - where to backup; relative or absolute" + echo " -n - number of commit to backup (default: unlimited)" + echo " -i - ignore tracking information - to restart from scratch" + echo " -v - verbose mode" + echo " -x - debug mode" + echo " -h - this help" exit 0 ;; ?)