summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Fyfe <andrew@neptune-one.net>2007-04-11 20:53:43 +0100
committerDan McGee <dan@archlinux.org>2007-05-27 17:16:27 -0400
commit2b6bc5bcda7de08507df82cc2a275f7cd4a4e3c4 (patch)
tree8af2607a884663f67ab2cc45b19bfa777374e22d
parentc3876845b223c9ced64582fb5cf3e9efc687eaa2 (diff)
downloadpacman-2b6bc5bcda7de08507df82cc2a275f7cd4a4e3c4.tar.xz
autotool scripts/abs
- move scripts/abs -> scripts/abs.in - add -V --version options to scripts/abs.in - add autotool commands to generate scripts/abs Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
-rw-r--r--configure.ac1
-rw-r--r--scripts/Makefile.am2
-rwxr-xr-xscripts/abs.in (renamed from scripts/abs)15
3 files changed, 17 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 3ee1567a..4aad0aa7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -217,6 +217,7 @@ src/pacman/Makefile
src/pacman/po/Makefile.in
src/util/Makefile
scripts/Makefile
+scripts/abs
scripts/makepkg
doc/Makefile
etc/Makefile
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 3e81b8cc..58312e0a 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -13,7 +13,7 @@ bin_SCRIPTS = \
repo-remove \
updatesync
-EXTRA_DIST = abs \
+EXTRA_DIST = abs.in \
gensync \
makepkg.in \
makeworld \
diff --git a/scripts/abs b/scripts/abs.in
index 2ec4322c..76040270 100755
--- a/scripts/abs
+++ b/scripts/abs.in
@@ -1,5 +1,6 @@
#!/bin/bash
+myver='@PACKAGE_VERSION@'
CONFDIR="/etc/abs"
CONNMODE="m"
@@ -19,6 +20,15 @@ usage() {
echo "If -p is specified, the connection is opened in passive mode."
}
+version() {
+ printf "abs (pacman) %s\n" "$myver"
+ printf "Copyright (C) 2002-2007 Judd Vinet <jvinet@zeroflux.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
+}
+
update() {
cd "$ABSROOT"
for sup in "${SUPFILES[@]}"; do
@@ -42,6 +52,11 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
exit 0
fi
+if [ "$1" = "-V" ] || [ "$1" = "--version" ]; then
+ version
+ exit 0
+fi
+
if [ ! -d "$ABSROOT" ]; then
echo "abs: $ABSROOT does not exist (or is not a directory)"
exit 1