diff options
Diffstat (limited to 'git-update-agent')
-rw-r--r-- | git-update-agent | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/git-update-agent b/git-update-agent index e932afe..af8a0df 100644 --- a/git-update-agent +++ b/git-update-agent @@ -199,6 +199,7 @@ Usage: ${PROGRAM} [OPTIONS]... --init-with initialize a project with the given URL --track track a git repository not initialized with $PROGRAM --disable-tracking disable tracking + --version output version _EOF } @@ -322,6 +323,10 @@ init_repo() { set +e } +print_version() { + echo "0.0.1" +} + # # API # @@ -353,7 +358,7 @@ git_update_agent() { shift if [[ $# -eq 0 ]]; then - die "--init requires an option" + die "--init-with requires an option" fi remote_url="$1" @@ -362,6 +367,7 @@ git_update_agent() { ;; --track) track=1; shift ;; --disable-tracking) disable_tracking=1; shift ;; + --version) print_version; exit 0 ;; *) die "$(print_usage)" ;; esac done |