summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAndrew Fyfe <andrew@neptune-one.net>2007-04-11 22:02:56 +0100
committerDan McGee <dan@archlinux.org>2007-05-27 17:16:27 -0400
commitf6b0869ee56d6048c954bc2a6df496b8e452ac6a (patch)
tree1dba0f26262de08e2ee3f6398c9f9141bb0945f7 /scripts
parenta73e9a24affa79c2d83e849f7f3c2efd12ef41f0 (diff)
downloadpacman-f6b0869ee56d6048c954bc2a6df496b8e452ac6a.tar.xz
autotool scripts/repo-add
- move scripts/repo-add -> scripts/repo-add.in - add -V --version options to scripts/repo-add.in - add autotool commands to generate scripts/repo-add Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.am2
-rwxr-xr-xscripts/repo-add.in (renamed from scripts/repo-add)17
2 files changed, 17 insertions, 2 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 98621e60..e131b865 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -19,7 +19,7 @@ EXTRA_DIST = abs.in \
makeworld.in \
pacman-optimize.in \
rankmirrors \
- repo-add \
+ repo-add.in \
repo-remove \
updatesync
diff --git a/scripts/repo-add b/scripts/repo-add.in
index cf58585c..f8c71557 100755
--- a/scripts/repo-add
+++ b/scripts/repo-add.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=""
@@ -43,6 +43,15 @@ usage() {
echo
}
+version() {
+ printf "repo-add (pacman) %s\n" "$myver"
+ printf "Copyright (C) 2006 Aaron Griffin <aaron@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
+}
+
# return calculated checksum of package
# arg1 - checksum type
# arg2 - path to package
@@ -215,6 +224,12 @@ if [ "$1" = "-h" -o "$1" = "--help" ]; then
exit 0
fi
+# check for version flags
+if [ "$1" = "-V" -o "$1" = "--version" ]; then
+ version
+ exit 0
+fi
+
# check for correct number of args
if [ $# -lt 2 ]; then
usage