summaryrefslogtreecommitdiff
path: root/scripts/makepkg.in
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-05-29 16:53:15 -0400
committerDan McGee <dan@archlinux.org>2007-05-29 16:53:15 -0400
commit103c7243a2d50dd46c0b5efefdc2e1b1d24e30e0 (patch)
treead7914cb0864b1ae80f44dc49f967e20f888db59 /scripts/makepkg.in
parent2760828e9dff1250c1160b7df2f376107ffe134f (diff)
Get --help and --version options working on all scripts
Added the autoconf option std-options to the scripts/ directory, which checks to ensure all programs have both --help and --version options. A few things needed cleaning up to get this working. To test these types of options, use the 'make distcheck' target. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts/makepkg.in')
-rw-r--r--scripts/makepkg.in27
1 files changed, 22 insertions, 5 deletions
diff --git a/scripts/makepkg.in b/scripts/makepkg.in
index 0d147041..2884e5db 100644
--- a/scripts/makepkg.in
+++ b/scripts/makepkg.in
@@ -600,7 +600,7 @@ installpackage() {
}
usage() {
- printf "$(gettext "makepkg version %s")\n" "$myver"
+ printf "$(gettext "makepkg (pacman) %s")\n" "$myver"
echo
printf "$(gettext "Usage: %s [options]")\n" "$0"
echo
@@ -633,6 +633,15 @@ usage() {
echo
}
+version() {
+ printf "$(gettext "makepkg (pacman) %s")\n" "$myver"
+ echo "$(gettext "Copyright (C) 2002-2007 Judd Vinet <jvinet@zeroflux.org>.")"
+ echo
+ echo "$(gettext "This is free software; see the source for copying conditions.")"
+ echo "$(gettext "There is NO WARRANTY, to the extent permitted by law.")"
+ echo
+}
+
ARGLIST=$@
#preserve environment variables
@@ -684,6 +693,10 @@ while [ "$#" -ne "0" ]; do
usage
exit 0
;;
+ --version)
+ version
+ exit 0
+ ;;
--*)
usage
exit 1
@@ -699,10 +712,6 @@ while [ "$#" -ne "0" ]; do
f) FORCE=1 ;;
F) INFAKEROOT=1 ;;
g) GENINTEG=1 ;;
- h)
- usage
- exit 0
- ;;
i) INSTALL=1 ;;
L) LOGGING=1 ;;
m) USE_COLOR="n" ;;
@@ -712,6 +721,14 @@ while [ "$#" -ne "0" ]; do
R) REPKG=1 ;;
s) DEP_BIN=1 ;;
S) SUDO=1 ;;
+ h)
+ usage
+ exit 0
+ ;;
+ V)
+ version
+ exit 0
+ ;;
-)
OPTIND=0
break