index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | scripts/Makefile.am | 2 | ||||
-rwxr-xr-x | scripts/repo-remove.in (renamed from scripts/repo-remove) | 17 |
diff --git a/scripts/Makefile.am b/scripts/Makefile.am index e131b865..7e1fbc3b 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -20,7 +20,7 @@ EXTRA_DIST = abs.in \ pacman-optimize.in \ rankmirrors \ repo-add.in \ - repo-remove \ + repo-remove.in \ updatesync abs gensync makepkg makeworld pacman-optimize rankmirrors repo-add repo-remove re-pacman updatesync: diff --git a/scripts/repo-remove b/scripts/repo-remove.in index 37079d99..6e2a6579 100755 --- a/scripts/repo-remove +++ b/scripts/repo-remove.in @@ -19,7 +19,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, # USA. -myver='3.0.0' +myver='@PACKAGE_VERSION@' FORCE=0 REPO_DB_FILE="" @@ -40,6 +40,15 @@ usage() { echo } +version() { + printf "repo-remove (pacman) %s\n" "$myver" + printf "Copyright (C) 2007 Dan McGee <dan@archlinux.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 +} + # test if a file is a repository DB test_repo_db_file () { if [ -f "$REPO_DB_FILE" ]; then @@ -71,6 +80,12 @@ if [ "$1" = "-h" -o "$1" = "--help" ]; then exit 0 fi +# check for version flags +if [ "$1" = "-V" -o "$1" = "--version" ]; thhen + version + exit 0 +fi + # check for correct number of args if [ $# -lt 2 ]; then usage |