From d0fb27cef44cf20e755fc0aa832d5da2671cf1ed Mon Sep 17 00:00:00 2001 From: Judd Vinet Date: Sun, 22 Jan 2006 02:16:41 +0000 Subject: added new options field to PKGBUILDs for package-by-package overrides --- scripts/updatesync | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'scripts/updatesync') 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 -- cgit v1.2.3-70-g09d2