summaryrefslogtreecommitdiff
path: root/src/treepkg
diff options
context:
space:
mode:
Diffstat (limited to 'src/treepkg')
-rwxr-xr-xsrc/treepkg13
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