index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | src/lib/build/build.sh | 9 |
diff --git a/src/lib/build/build.sh b/src/lib/build/build.sh index a19dd37..5276653 100644 --- a/src/lib/build/build.sh +++ b/src/lib/build/build.sh @@ -134,7 +134,7 @@ pkgctl_build() { local WORKER_SLOT= # variables - local _arch path pkgbase pkgrepo source + local _arch path pkgbase pkgrepo source pkgbuild_checksum while (( $# )); do case $1 in @@ -311,6 +311,7 @@ pkgctl_build() { . ./PKGBUILD pkgbase=${pkgbase:-$pkgname} pkgrepo=${REPO} + pkgbuild_checksum=$(b2sum PKGBUILD | awk '{print $1}') msg "Building ${pkgbase}" # auto-detection of build target @@ -412,6 +413,12 @@ pkgctl_build() { updpkgsums fi + # re-source the PKGBUILD if it changed + if [[ ${pkgbuild_checksum} != "$(b2sum PKGBUILD | awk '{print $1}')" ]]; then + # shellcheck source=contrib/makepkg/PKGBUILD.proto + . ./PKGBUILD + fi + # execute build for arch in "${BUILD_ARCH[@]}"; do if [[ -n $arch ]]; then |