autotool scripts/repo-remove

- move scripts/repo-remove -> scripts/repo-remove.in
	- add -V --version options to scripts/repo-remove.in
	- add autotool commands to generate scripts/repo-remove

Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
This commit is contained in:
Andrew Fyfe 2007-04-11 22:10:55 +01:00 committed by Dan McGee
parent 49eddd3feb
commit 48946b624b
3 changed files with 18 additions and 2 deletions

View File

@ -223,6 +223,7 @@ scripts/makepkg
scripts/makeworld
scripts/pacman-optimize
scripts/repo-add
scripts/repo-remove
doc/Makefile
etc/Makefile
etc/makepkg.conf

View File

@ -20,7 +20,7 @@ EXTRA_DIST = abs.in \
pacman-optimize.in \
rankmirrors \
repo-add.in \
repo-remove \
repo-remove.in \
updatesync
abs gensync makepkg makeworld pacman-optimize rankmirrors repo-add repo-remove re-pacman updatesync:

View File

@ -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=""
@ -40,6 +40,15 @@ usage() {
echo
}
version() {
printf "repo-remove (pacman) %s\n" "$myver"
printf "Copyright (C) 2007 Dan McGee <dan@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
}
# test if a file is a repository DB
test_repo_db_file () {
if [ -f "$REPO_DB_FILE" ]; then
@ -71,6 +80,12 @@ if [ "$1" = "-h" -o "$1" = "--help" ]; then
exit 0
fi
# check for version flags
if [ "$1" = "-V" -o "$1" = "--version" ]; thhen
version
exit 0
fi
# check for correct number of args
if [ $# -lt 2 ]; then
usage