diff options
author | Judd Vinet <judd@archlinux.org> | 2006-01-22 03:16:41 +0100 |
---|---|---|
committer | Judd Vinet <judd@archlinux.org> | 2006-01-22 03:16:41 +0100 |
commit | d0fb27cef44cf20e755fc0aa832d5da2671cf1ed (patch) | |
tree | 9ff2fb3c062df87eb88480ac5691e207573f984c /scripts/updatesync | |
parent | a10584aec48617b4152b7e0653eb8b43f062839a (diff) | |
download | pacman-d0fb27cef44cf20e755fc0aa832d5da2671cf1ed.tar.gz pacman-d0fb27cef44cf20e755fc0aa832d5da2671cf1ed.tar.xz |
added new options field to PKGBUILDs for package-by-package overrides
Diffstat (limited to 'scripts/updatesync')
-rwxr-xr-x | scripts/updatesync | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/scripts/updatesync b/scripts/updatesync index b90417e6..940a2748 100755 --- a/scripts/updatesync +++ b/scripts/updatesync @@ -21,7 +21,7 @@ # USA. # -myver='2.9.7' +myver='2.9.8' usage() { echo "updatesync $myver" @@ -54,6 +54,18 @@ die() exit 1 } +check_option() { + local i + for i in ${options[@]}; do + local uc=`echo $i | tr [:lower:] [:upper:]` + local lc=`echo $i | tr [:upper:] [:lower:]` + if [ "$uc" = "$1" -o "$lc" = "$1" ]; then + echo $1 + return + fi + done +} + get_md5checksum() { if [ "$pkgdir" != "" ]; then @@ -72,7 +84,7 @@ get_md5checksum() db_write_entry() { unset pkgname pkgver pkgrel pkgdesc force - unset groups replaces provides depends conflicts + unset groups replaces provides depends conflicts options source $1 || return 1 cd $ustmpdir mkdir $pkgname-$pkgver-$pkgrel || return 1 @@ -110,7 +122,7 @@ db_write_entry() done echo "" >>desc fi - if [ "$force" = "y" -o "$force" = "Y" ]; then + if [ "$force" = "y" -o "$force" = "Y" -o "`check_option FORCE`" ]; then echo "%FORCE%" >>desc echo "" >>desc fi |