summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.am2
-rwxr-xr-xscripts/pacman-optimize.in (renamed from scripts/pacman-optimize)17
2 files changed, 16 insertions, 3 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 9d67270a..98621e60 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -17,7 +17,7 @@ EXTRA_DIST = abs.in \
gensync.in \
makepkg.in \
makeworld.in \
- pacman-optimize \
+ pacman-optimize.in \
rankmirrors \
repo-add \
repo-remove \
diff --git a/scripts/pacman-optimize b/scripts/pacman-optimize.in
index ca170334..2bfec40e 100755
--- a/scripts/pacman-optimize
+++ b/scripts/pacman-optimize.in
@@ -2,7 +2,7 @@
#
# pacman-optimize
#
-# Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
+# Copyright (c) 2002-2007 by Judd Vinet <jvinet@zeroflux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
# USA.
#
-myver='3.0.0'
+myver='@PACKAGE_VERSION@'
error() {
if [ "$USECOLOR" = "YES" -o "$USECOLOR" = "yes" ]; then
@@ -49,6 +49,15 @@ usage() {
echo
}
+version() {
+ printf "pacman-optimize (pacman) %s\n" "$myver"
+ printf "Copyright (C) 2002-2007 Judd Vinet <jvinet@zeroflux.org>.\n"
+ echo
+ printf "This is free software; see the source for copying conditions.\n"
+ printf "There is NO WARRANTY, to the extent permitted by law.\n"
+ echo
+}
+
die() {
error $@
exit 1
@@ -66,6 +75,10 @@ if [ "$1" != "" ]; then
usage
exit 0
fi
+ if [ "$1" = "-V" -o "$1" = "--version" ]; then
+ version
+ exit 0
+ fi
dbroot="$1"
fi