summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAndrew Fyfe <andrew@neptune-one.net>2007-04-11 22:10:55 +0100
committerDan McGee <dan@archlinux.org>2007-05-27 17:16:27 -0400
commit48946b624b9005c8295d02e51a7aa98cc914c801 (patch)
treef653cb4a4d0d89f5200109837f1757d12c386c92 /scripts
parent49eddd3feb8ab4f2f20b0ef99dffb5fc2f962821 (diff)
downloadpacman-48946b624b9005c8295d02e51a7aa98cc914c801.tar.xz
autotool scripts/repo-remove
- move scripts/repo-remove -> scripts/repo-remove.in - add -V --version options to scripts/repo-remove.in - add autotool commands to generate scripts/repo-remove Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.am2
-rwxr-xr-xscripts/repo-remove.in (renamed from scripts/repo-remove)17
2 files changed, 17 insertions, 2 deletions
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