diff options
author | flu0r1ne <flu0r1ne@flu0r1ne.net> | 2021-08-23 03:03:40 -0500 |
---|---|---|
committer | flu0r1ne <flu0r1ne@flu0r1ne.net> | 2021-08-23 03:03:40 -0500 |
commit | e504ed5981dd2df69865ede16722c2e1632de774 (patch) | |
tree | f63f005c871fa1ab01586d81a43de68d2a1a13f0 /git-update-agent | |
parent | dfecbd5b588c1fbdaacf3df8a0ab93a668c282d2 (diff) | |
download | deb-git-update-agent-e504ed5981dd2df69865ede16722c2e1632de774.tar.xz deb-git-update-agent-e504ed5981dd2df69865ede16722c2e1632de774.zip |
Add version command
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 |