summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Fyfe <andrew@neptune-one.net>2007-04-11 23:16:56 +0200
committerDan McGee <dan@archlinux.org>2007-05-27 23:16:28 +0200
commite9e19b7cc62c54795695589aa975fa31f1e65ed9 (patch)
tree0878fcfae5322a5ab13c53d96d32205cb7378e17
parent48946b624b9005c8295d02e51a7aa98cc914c801 (diff)
downloadpacman-e9e19b7cc62c54795695589aa975fa31f1e65ed9.tar.gz
pacman-e9e19b7cc62c54795695589aa975fa31f1e65ed9.tar.xz
autotool scripts/updatesync
- move scripts/updatesync -> scripts/updatesync.in - add -V --version options to scripts/updatesync.in - add autotool commands to generate scripts/updatesync Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
-rw-r--r--configure.ac1
-rw-r--r--scripts/Makefile.am2
-rwxr-xr-xscripts/updatesync.in (renamed from scripts/updatesync)24
3 files changed, 21 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index eebb21ca..dec2bb44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -224,6 +224,7 @@ scripts/makeworld
scripts/pacman-optimize
scripts/repo-add
scripts/repo-remove
+scripts/updatesync
doc/Makefile
etc/Makefile
etc/makepkg.conf
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 7e1fbc3b..8b30022c 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -21,6 +21,6 @@ EXTRA_DIST = abs.in \
rankmirrors \
repo-add.in \
repo-remove.in \
- updatesync
+ updatesync.in
abs gensync makepkg makeworld pacman-optimize rankmirrors repo-add repo-remove re-pacman updatesync:
diff --git a/scripts/updatesync b/scripts/updatesync.in
index 7c6dab27..eb82bdec 100755
--- a/scripts/updatesync
+++ b/scripts/updatesync.in
@@ -21,7 +21,7 @@
# USA.
#
-myver='3.0.0'
+myver='@PACKAGE_VERSION@'
# functions
@@ -49,6 +49,15 @@ usage() {
exit 0
}
+version() {
+ printf "updatesync (pacman) %s\n" "$myver"
+ printf "Copyright (C) 2004 Jason Chu <jason@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
+}
+
error () {
echo "==> ERROR: $*" >&2
}
@@ -71,16 +80,21 @@ check_force () {
# PROGRAM START
-if [ $# -lt 3 ]; then
+if [ "$1" = "-h" -o "$1" = "--help" ]; then
usage
- exit 1
+ exit 0
fi
-if [ "$1" = "-h" -o "$1" = "--help" ]; then
- usage
+if [ "$1" = "-V" -o "$1" = "--version" ]; then
+ version
exit 0
fi
+if [ $# -lt 3 ]; then
+ usage
+ exit 1
+fi
+
# source system and user makepkg.conf
if [ -r /etc/makepkg.conf ]; then
source /etc/makepkg.conf