diff options
author | Teddy Wing | 2018-02-21 01:04:24 +0100 |
---|---|---|
committer | Teddy Wing | 2018-02-21 01:04:24 +0100 |
commit | 8975f836e8b79cda60cff8969f8c51fc6120b193 (patch) | |
tree | 577e8ea3356dc18c0cad9e0b008beb5049b1d5b1 | |
parent | e9e79681302186082a0b492cc3476390db538a34 (diff) | |
download | git-branch-list-8975f836e8b79cda60cff8969f8c51fc6120b193.tar.bz2 |
git-branch-list: Add a flag to output the program version
-rwxr-xr-x | git-branch-list | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/git-branch-list b/git-branch-list index e7d7dfe..fe24d71 100755 --- a/git-branch-list +++ b/git-branch-list @@ -19,6 +19,7 @@ # along with this program. If not, see <https://www.gnu.org/licenses/>. DATABASE=.git/info/git-branch-list +VERSION=0.0.1 function initialise_database () { if [ -d .git ]; then @@ -32,6 +33,11 @@ usage: git branch-list or: git branch-list save [<branch-name>] or: git branch-list drop [<branch-name>] or: git branch-list ID + +Generic options + + -h show this help + -v display version __EOF__ } @@ -112,6 +118,11 @@ case "$command" in exit 0 ;; + -v) + echo "$VERSION" + + exit 0 + ;; save) save_branch "$2" ;; |