aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-02-12 23:04:17 +0100
committerTeddy Wing2018-02-12 23:04:17 +0100
commit94aca1ce3b9c867fcca5118f72606d561acd0c30 (patch)
tree31ec175f1e4a064eb4f1b9c6099f247369f9036e
parent2719b487418e90a14514c190f9d5362f85717de9 (diff)
downloadharvester-94aca1ce3b9c867fcca5118f72606d561acd0c30.tar.bz2
harvester: Add version flag
Provide a way to display the program version from the script.
-rwxr-xr-xharvester8
1 files changed, 8 insertions, 0 deletions
diff --git a/harvester b/harvester
index 30b2996..d35803c 100755
--- a/harvester
+++ b/harvester
@@ -17,6 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with Harvester. If not, see <http://www.gnu.org/licenses/>.
+VERSION='0.0.1'
+
function print_usage () {
cat 1>&2 <<__EOF__
Usage: harvester [<flags>]
@@ -28,6 +30,7 @@ Flags:
-d, --date=DATE Date when work was done (e.g. 2017-01-31).
-m, --description=DESCRIPTION Description of work.
--list-modules List project sprints with IDs.
+ -v, --version Show application version.
__EOF__
}
@@ -131,6 +134,11 @@ function main () {
return 0
;;
+ -v | --version)
+ echo $VERSION
+
+ return 0
+ ;;
esac
done