summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
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