diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-03 23:45:52 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-03 23:45:52 +0100 |
commit | a59b640ba3e027a07be8d90eb113afa82e825779 (patch) | |
tree | 383afdd58abb0f77c4a87900abc11736f3548445 | |
parent | a2cd862d532aeb888aebacfa94ce41f59e5226f7 (diff) | |
download | bin-a59b640ba3e027a07be8d90eb113afa82e825779.zip bin-a59b640ba3e027a07be8d90eb113afa82e825779.tar.gz |
git-sync: add help function
-rwxr-xr-x | git-synk | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1,5 +1,14 @@ #! /bin/sh +function help() { + echo "${0##*/} [drbs] [push|pull] [remote]" + echo -e "-d --git-dir set GIT_DIR" + echo -e "-r --git-remote set GIT_REMOTE" + echo -e "-b --git-branch set GIT_BRANCH" + echo -e "-s --use-stash set USE_STASH" + exit 0 +} + for arg in $@; do option=`echo "'$arg'" | cut -d'=' -f1 | tr -d "'"` value=`echo "'$arg'" | cut -d'=' -f2- | tr -d "'"` @@ -11,6 +20,7 @@ for arg in $@; do -r|--git-remote) GIT_REMOTE=$value;; -b|--git-branch) GIT_BRANCH=$value;; -s|--use-stash) USE_STASH=1;; + -h|--help) help;; *) GIT_REMOTE=$arg;; esac done |