summaryrefslogtreecommitdiffstats
path: root/scripts/gensync
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2006-01-22 03:16:41 +0100
committerJudd Vinet <judd@archlinux.org>2006-01-22 03:16:41 +0100
commitd0fb27cef44cf20e755fc0aa832d5da2671cf1ed (patch)
tree9ff2fb3c062df87eb88480ac5691e207573f984c /scripts/gensync
parenta10584aec48617b4152b7e0653eb8b43f062839a (diff)
downloadpacman-d0fb27cef44cf20e755fc0aa832d5da2671cf1ed.tar.gz
pacman-d0fb27cef44cf20e755fc0aa832d5da2671cf1ed.tar.xz
added new options field to PKGBUILDs for package-by-package overrides
Diffstat (limited to 'scripts/gensync')
-rwxr-xr-xscripts/gensync18
1 files changed, 15 insertions, 3 deletions
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