diff options
author | Allan McRae <allan@archlinux.org> | 2015-02-01 13:09:39 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2015-02-12 05:00:57 +0100 |
commit | 00da25a5ea3413e128c455fd711cf46692df6159 (patch) | |
tree | ecde71a27ed78798dceb0d889d4f96b9eab73277 /scripts/libmakepkg/tidy/upx.sh.in | |
parent | bfe9b56e1fe3a0c17fa535acf8d29bbe318c0b8a (diff) | |
download | pacman-00da25a5ea3413e128c455fd711cf46692df6159.tar.gz pacman-00da25a5ea3413e128c455fd711cf46692df6159.tar.xz |
libmakepkg: make package tidy functions extendable
To add a new packaging option, drop a file into libmakepkg/tidy that contains
a 'packaging_options+=('<option>') and a function that implements that
option. The function needs added to the 'tidy_remove' array if it removes
files or the 'tidy_modify' array otherwise.
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/libmakepkg/tidy/upx.sh.in')
-rw-r--r-- | scripts/libmakepkg/tidy/upx.sh.in | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/libmakepkg/tidy/upx.sh.in b/scripts/libmakepkg/tidy/upx.sh.in index 9012cd3e..ec40b2e2 100644 --- a/scripts/libmakepkg/tidy/upx.sh.in +++ b/scripts/libmakepkg/tidy/upx.sh.in @@ -27,6 +27,9 @@ source "$LIBRARY/util/message.sh" source "$LIBRARY/util/option.sh" +packaging_options+=('upx') +tidy_modify+=('tidy_upx') + tidy_upx() { if check_option "upx" "y"; then msg2 "$(gettext "Compressing binaries with %s...")" "UPX" |