diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-05 10:53:45 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-05 10:53:45 -0500 |
commit | 64b427c2449eb45ec945afd09cced57c8a7d7e4e (patch) | |
tree | 82de2c0c00966d8ab37fabcce83ad8a848eb1781 /src/treepkg | |
parent | 4c6bb6654ac5a2b4d62bc2129e2d030663b76674 (diff) |
treepkg: make HOOK* settings optional, update documentation on the HOOK*s
Diffstat (limited to 'src/treepkg')
-rwxr-xr-x | src/treepkg | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/treepkg b/src/treepkg index bfe2163..4dc29dc 100755 --- a/src/treepkg +++ b/src/treepkg @@ -19,7 +19,9 @@ source libremessages source $(librelib conf.sh) load_files libretools -check_vars libretools HOOKPREBUILD FULLBUILDCMD HOOKLOCALRELEASE || exit 1 +check_vars libretools FULLBUILDCMD || exit 1 +# The following variables are actually optional +#check_vars libretools HOOKPREBUILD HOOKLOCALRELEASE || exit 1 load_files makepkg term_title "${0##*/}" @@ -205,11 +207,16 @@ if [[ ${DEPTH} -eq 0 ]]; then pushd "${BUILDDIR}/${_pkg}" >/dev/null sudo -E pacman -Syu --noconfirm - ${HOOKPREBUILD} + if [[ -n "${HOOKPREBUILD:-}" ]]; then + ${HOOKPREBUILD} + fi ${FULLBUILDCMD} + # Run local release hook with $1 = $repo - ${HOOKLOCALRELEASE} $(egrep ";${_pkg#*_};" "${BUILDORDER}" | cut -d';' -f6) + if [[ -n "${HOOKLOCALRELEASE:-}" ]]; then + ${HOOKLOCALRELEASE} $(egrep ";${_pkg#*_};" "${BUILDORDER}" | cut -d';' -f6) + fi touch built_ok popd >/dev/null |