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>
This commit is contained in:
parent
a73e9a24af
commit
f6b0869ee5
3 changed files with 18 additions and 2 deletions
|
@ -222,6 +222,7 @@ scripts/gensync
|
||||||
scripts/makepkg
|
scripts/makepkg
|
||||||
scripts/makeworld
|
scripts/makeworld
|
||||||
scripts/pacman-optimize
|
scripts/pacman-optimize
|
||||||
|
scripts/repo-add
|
||||||
doc/Makefile
|
doc/Makefile
|
||||||
etc/Makefile
|
etc/Makefile
|
||||||
etc/makepkg.conf
|
etc/makepkg.conf
|
||||||
|
|
|
@ -19,7 +19,7 @@ EXTRA_DIST = abs.in \
|
||||||
makeworld.in \
|
makeworld.in \
|
||||||
pacman-optimize.in \
|
pacman-optimize.in \
|
||||||
rankmirrors \
|
rankmirrors \
|
||||||
repo-add \
|
repo-add.in \
|
||||||
repo-remove \
|
repo-remove \
|
||||||
updatesync
|
updatesync
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
# USA.
|
# USA.
|
||||||
|
|
||||||
myver='3.0.0'
|
myver='@PACKAGE_VERSION@'
|
||||||
|
|
||||||
FORCE=0
|
FORCE=0
|
||||||
REPO_DB_FILE=""
|
REPO_DB_FILE=""
|
||||||
|
@ -43,6 +43,15 @@ usage() {
|
||||||
echo
|
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
|
# return calculated checksum of package
|
||||||
# arg1 - checksum type
|
# arg1 - checksum type
|
||||||
# arg2 - path to package
|
# arg2 - path to package
|
||||||
|
@ -215,6 +224,12 @@ if [ "$1" = "-h" -o "$1" = "--help" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# check for version flags
|
||||||
|
if [ "$1" = "-V" -o "$1" = "--version" ]; then
|
||||||
|
version
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# check for correct number of args
|
# check for correct number of args
|
||||||
if [ $# -lt 2 ]; then
|
if [ $# -lt 2 ]; then
|
||||||
usage
|
usage
|
Loading…
Add table
Reference in a new issue