index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | scripts/updatesync | 21 |
diff --git a/scripts/updatesync b/scripts/updatesync index a4a6847f..7c6dab27 100755 --- a/scripts/updatesync +++ b/scripts/updatesync @@ -23,6 +23,8 @@ myver='3.0.0' +# functions + usage() { echo "updatesync $myver" echo "usage: $0 <action> <destfile> <option> [package_directory]" @@ -47,11 +49,6 @@ usage() { exit 0 } -BUILDSCRIPT="PKGBUILD" -PKGEXT="pkg.tar.gz" - -source /etc/makepkg.conf - error () { echo "==> ERROR: $*" >&2 } @@ -72,6 +69,8 @@ check_force () { false } +# PROGRAM START + if [ $# -lt 3 ]; then usage exit 1 @@ -82,6 +81,18 @@ if [ "$1" = "-h" -o "$1" = "--help" ]; then exit 0 fi +# source system and user makepkg.conf +if [ -r /etc/makepkg.conf ]; then + source /etc/makepkg.conf +else + echo "ERROR: /etc/makepkg.conf not found. Can not continue." >&2 + exit 1 # $E_CONFIG_ERROR # TODO: error codes +fi + +if [ -r ~/.makepkg.conf ]; then + source ~/.makepkg.conf +fi + if [ "$1" != "upd" -a "$1" != "del" ]; then usage exit 1 |