summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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")