Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
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
parenta73e9a24affa79c2d83e849f7f3c2efd12ef41f0 (diff)
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>
-rw-r--r--configure.ac1
-rw-r--r--scripts/Makefile.am2
-rwxr-xr-xscripts/repo-add.in (renamed from scripts/repo-add)17
3 files changed, 18 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index bc36ce16..b31bc671 100644
--- a/configure.ac
+++ b/configure.ac
@@ -222,6 +222,7 @@ scripts/gensync
scripts/makepkg
scripts/makeworld
scripts/pacman-optimize
+scripts/repo-add
doc/Makefile
etc/Makefile
etc/makepkg.conf
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