summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Fyfe <andrew@neptune-one.net>2007-04-11 21:40:33 +0100
committerDan McGee <dan@archlinux.org>2007-05-27 17:16:27 -0400
commit95720106bb65c5d6013b0ecdd3be4a3b78509568 (patch)
tree5aa20c14950e64538c4b05d58a14b4615b3435b2
parentab53ee1e7c832453392c87c7f07961826ff9f16e (diff)
autotool scripts/pacman-optimize
- move scripts/pacman-optimize -> scripts/pacman-optimize.in - add -V --version options to scripts/pacman-optimize.in - add autotool commands to generate scripts/pacman-optimize Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
-rw-r--r--configure.ac1
-rw-r--r--scripts/Makefile.am2
-rwxr-xr-xscripts/pacman-optimize.in (renamed from scripts/pacman-optimize)17
3 files changed, 17 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index b3bc443e..bc36ce16 100644
--- a/configure.ac
+++ b/configure.ac
@@ -221,6 +221,7 @@ scripts/abs
scripts/gensync
scripts/makepkg
scripts/makeworld
+scripts/pacman-optimize
doc/Makefile
etc/Makefile
etc/makepkg.conf
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