summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-08-06 13:51:36 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-08-06 13:51:36 +0200
commit86cd189dc89a76dba0987341749e3817b31c8941 (patch)
tree508adf016271b4a379bfdcb3efcdffc3b14239a1
parent38a58874705912bf67ab198b50771a93ddfe478c (diff)
downloadbuildscripts-86cd189dc89a76dba0987341749e3817b31c8941.tar.gz
buildscripts-86cd189dc89a76dba0987341749e3817b31c8941.tar.bz2
buildscripts-86cd189dc89a76dba0987341749e3817b31c8941.zip
Improvement for previous commit: Use elif clause rather than continue statement.
-rwxr-xr-xbin/sbuild-deb-package11
1 files changed, 4 insertions, 7 deletions
diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package
index ec3c3b2..8c8d26f 100755
--- a/bin/sbuild-deb-package
+++ b/bin/sbuild-deb-package
@@ -178,8 +178,7 @@ clear_pkgdist() {
for l_ARCH in amd64 i386; do
if echo " ${SKIP_BUILDS} " | grep -q " ${l_DIST}:${l_CODENAME}/${l_ARCH} "; then
echo "### Skipping pkgdist dir cleanup (${l_DIST}:${l_CODENAME}/${l_ARCH}) as requested in SKIP_BUILDS env var."
- fi
- [ "x${SKIP_ARCH}" != "x${l_ARCH}" ] && {
+ elif [ "x${SKIP_ARCH}" != "x${l_ARCH}" ]; then
mkdir -p -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}"
rm -f -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}/dupload.conf"
rm -f -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}/"*_*.changes
@@ -188,7 +187,7 @@ clear_pkgdist() {
rm -f -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}/"*_*.dsc
rm -f -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}/"*_*.tar.gz
rm -f -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}/"*.deb
- }
+ fi
done
done
}
@@ -400,13 +399,11 @@ upload_packages() {
for l_ARCH in amd64 i386; do
if echo " ${SKIP_BUILDS} " | grep -q " ${l_DIST}:${l_CODENAME}/${l_ARCH} "; then
echo "### Skipping upload (${l_DIST}:${l_CODENAME}/${l_ARCH}) as requested in SKIP_BUILDS env var."
- continue
- fi
- [ "x${SKIP_ARCH}" != "x${l_ARCH}" ] && {
+ elif [ "x${SKIP_ARCH}" != "x${l_ARCH}" ]; then
cd "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}"
test -f "./dupload.conf" || ln -s -- "${HOME}/.dupload.conf.${PREFIX}" "./dupload.conf" && true
ls -- "${DEBSRCPKG}_"*.changes >/dev/null 2>&1 && dupload --to "${PREFIX}-${l_DIST}-${COMPONENT}" "${DEBSRCPKG}_"*.changes 0<&-
- }
+ fi
done
done
done