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 similarity index 89% rename from scripts/pacman-optimize rename to 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 +# Copyright (c) 2002-2007 by Judd Vinet # # 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 .\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