docs: More help/usage

This commit is contained in:
2024-10-08 21:33:32 +02:00
parent c115babaca
commit 3c52c40250
2 changed files with 34 additions and 3 deletions

18
scripts/backup.sh Normal file → Executable file
View File

@ -45,8 +45,22 @@ do
set -x
;;
h)
echo "Usage: $0 [-r <repository url>] [-b <branch>] [-d <absolute path dest>] [-n <num>] [-v] [-x] [-h]"
echo "Ex: $0 -r $REPOSITORY -b $BRANCH -d $DATA_DIR"
echo "Usage: $0 [-r <repository url>] [-b <branch>] [-d <path dest>] [-n <num>] [-v] [-x] [-i] [-h]"
echo
echo "Ex: $0 \\"
echo " -r $REPOSITORY \\"
echo " -b $BRANCH \\"
echo " -d $DATA_DIR"
echo
echo "Available flags:"
echo " -r <repository url> - set remote repository url (suffixed by .git) to backup"
echo " -b <branch> - branch to backup"
echo " -d </path/to/path> - where to backup; relative or absolute"
echo " -n <num> - 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
;;
?)