summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-04-25 15:54:17 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-04-25 15:57:27 -0400
commitdebfb3821f4c40f9a9625b76b211c8c6b50e0aac (patch)
tree0cb85b40ef06e81f943e7af2934fb08574ad64ca
parentc8a5d97eeadb53f4b3a6f4931f5278a99b2c3ff4 (diff)
beta 3 of librefetch
-rwxr-xr-xsrc/librefetch/librefetch15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch
index b637661..70ff184 100755
--- a/src/librefetch/librefetch
+++ b/src/librefetch/librefetch
@@ -47,7 +47,7 @@ usage() {
}
version() {
- print "librefetch (libretools) beta 2"
+ print "librefetch (libretools) beta 3"
echo
print "Copyright (C) 2013 Luke Shumaksr <lukeshu@sbcglobal.net>"
print "This is free software; see the source for copying conditions."
@@ -71,6 +71,17 @@ main() {
fi
makepkg="$(modified_makepkg "$(which "${MAKEPKG:-makepkg}")")"
+ # Mode: version, help ##################################################
+
+ if [[ $mode =~ version ]]; then
+ version
+ return 0
+ fi
+ if [[ $mode =~ help ]]; then
+ usage
+ return 0
+ fi
+
# Mode: checksums ######################################################
if [[ $mode =~ checksums ]]; then
@@ -148,6 +159,8 @@ parse_options() {
-D) mode=download;;
-g|--geninteg) mode=checksums;;
-p) BUILDFILE="$(readlink -m "$opt")";;
+ -V|--version) mode=version;;
+ -h|--help) mode=help;;
-*)
makepkg_opts+=("$arg")
$have_opt && makepkg_opts+=("$opt")