diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-02-05 10:35:29 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-02-05 10:35:29 +0000 |
commit | 0e9c2e708c8ee9017653c52cfc03b8ff40868c2f (patch) | |
tree | 6c48055baddca60873ad8e5690d0f5428ea9d9d1 | |
parent | b9685a9fc2a59096c4a88fefdc457e6232c2e815 (diff) | |
download | abuild-0e9c2e708c8ee9017653c52cfc03b8ff40868c2f.tar.gz abuild-0e9c2e708c8ee9017653c52cfc03b8ff40868c2f.tar.bz2 abuild-0e9c2e708c8ee9017653c52cfc03b8ff40868c2f.tar.xz abuild-0e9c2e708c8ee9017653c52cfc03b8ff40868c2f.zip |
abuild: support for variable options
so far only option avaiable is !strip, which disables stripping of binaries.
-rwxr-xr-x | abuild | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -315,7 +315,7 @@ EOF } package() { - stripbin + options_has "!strip" || stripbin package_apk } @@ -558,6 +558,21 @@ subpackages_has() { return 1 } +list_has() { + local needle="$1" + local i + shift + for i in $@; do + [ "$needle" = "$i" ] && return 0 + [ "$needle" = "!$i" ] && return 1 + done + return 1 +} + +options_has() { + list_has "$1" $options +} + # install package after build post_add() { local pkgf="$PKGDEST/$1-$pkgver-r$pkgrel.apk" |