summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-01-03 23:45:52 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-01-03 23:45:52 +0100
commita59b640ba3e027a07be8d90eb113afa82e825779 (patch)
tree383afdd58abb0f77c4a87900abc11736f3548445
parenta2cd862d532aeb888aebacfa94ce41f59e5226f7 (diff)
downloadbin-a59b640ba3e027a07be8d90eb113afa82e825779.zip
bin-a59b640ba3e027a07be8d90eb113afa82e825779.tar.gz
git-sync: add help function
-rwxr-xr-xgit-synk10
1 files changed, 10 insertions, 0 deletions
diff --git a/git-synk b/git-synk
index 71bd858..554b162 100755
--- a/git-synk
+++ b/git-synk
@@ -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