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/gensync | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'scripts/gensync') diff --git a/scripts/gensync b/scripts/gensync index cf399562..505ead56 100755 --- a/scripts/gensync +++ b/scripts/gensync @@ -20,7 +20,7 @@ # USA. # -myver='2.9.7' +myver='2.9.8' usage() { echo "gensync $myver" @@ -51,6 +51,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 @@ -69,7 +81,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 $gstmpdir mkdir $pkgname-$pkgver-$pkgrel || return 1 @@ -107,7 +119,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