diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-12-17 10:10:32 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-12-17 10:12:24 +0000 |
commit | 63f898c17a41acd7d22657209fed005ae3c55fcd (patch) | |
tree | bb852e4d975b1fdf34ec2aeceb6f8b638fb94fb8 | |
parent | add0652011de1c9d4aeb2ae152f198771ebe1743 (diff) | |
download | alpine-conf-63f898c17a41acd7d22657209fed005ae3c55fcd.zip |
lbu: implement support for lbu package pre/post hooks
scripts in /etc/lbu/pre-package.d/ will be executed prior creating the
tar ball and scripts in /etc/lbu/post-package.d/ will be executed after.
if pre-scripts fails, then will package not be created.
ref #220
-rw-r--r-- | lbu.in | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -21,6 +21,9 @@ INCLUDE_LIST="$sysconfdir"/include DEFAULT_CIPHER="aes-256-cbc" LBU_CONF="$sysconfdir"/lbu.conf +LBU_PREPACKAGE="$sysconfdir"/pre-package.d +LBU_POSTPACKAGE="$sysconfdir"/post-package.d + if [ -f "$LBU_CONF" ]; then . "$LBU_CONF" fi @@ -230,6 +233,10 @@ cmd_package() { check_openssl init_tmpdir tmpdir + if [ -d "$LBU_PREPACKAGE" ]; then + run-parts "$LBU_PREPACKAGE" || return 1 + fi + [ -n "$ENCRYPTION" ] && suff="$suff.$ENCRYPTION" # find filename @@ -294,6 +301,9 @@ cmd_package() { fi [ $rc -eq 0 ] && vecho "Created $pkg" fi + if [ -d "$LBU_POSTPACKAGE" ]; then + run-parts "$LBU_POSTPACKAGE" + fi return $rc } |