summaryrefslogtreecommitdiffstats
path: root/offload-build
diff options
context:
space:
mode:
authorLevente Polyak <anthraxx@archlinux.org>2019-11-07 22:28:17 +0100
committerLevente Polyak <anthraxx@archlinux.org>2019-11-30 13:21:23 +0100
commit20eec484fadd7212367749ee7cd37d3aa18e8c4e (patch)
tree7ff4a14eb002863c155466582bdd4ce40719160a /offload-build
parent6fffbfbc8af6b1194b977582fe3cb308b550f864 (diff)
downloaddevtools-20eec484fadd7212367749ee7cd37d3aa18e8c4e.tar.gz
devtools-20eec484fadd7212367749ee7cd37d3aa18e8c4e.tar.xz
offload-build: remove empty src dir when SRCDEST is set
Right now there is a bug in makepkg that leaves back an empty src directory if SRCDEST is set. This is purely cosmetic, but lets just politely try to rmdir it and fail silently if its empty or non-existent. Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
Diffstat (limited to 'offload-build')
-rwxr-xr-xoffload-build4
1 files changed, 4 insertions, 0 deletions
diff --git a/offload-build b/offload-build
index 688adf3..dab036d 100755
--- a/offload-build
+++ b/offload-build
@@ -88,6 +88,10 @@ trap 'rm -rf $SRCPKGDEST' EXIT INT TERM QUIT
export SRCPKGDEST=$(mktemp -d)
makepkg --source || die "unable to make source package"
+# Temporary cosmetic workaround makepkg if SRCDEST is set somewhere else
+# but an empty src dir is created in PWD. Remove once fixed in makepkg.
+rmdir --ignore-fail-on-non-empty src 2>/dev/null || true
+
mapfile -t files < <(
# This is sort of bash golfing but it allows running a mildly complex
# command over ssh with a single connection.