aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-buildpackage
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-09-18 15:54:40 +0000
committerMattia Rizzolo <mattia@mapreri.org>2015-09-18 15:54:40 +0000
commit65d723234bf5dcd99f083ab4d5087b75ded2cfa6 (patch)
treee05f2dfd925495b2790fda398fbf603699fb5bde /pbuilder-buildpackage
parent86f8423f481d8e9cddcfd8da808eee600f96675a (diff)
downloadpbuilder-65d723234bf5dcd99f083ab4d5087b75ded2cfa6.tar
pbuilder-65d723234bf5dcd99f083ab4d5087b75ded2cfa6.tar.gz
fix a whole bunch of warning from shellcheck
There are still quite some, this is a first chunk based on a given patch applied where i felt confident enough. Thanks: Herbert Parentes Fortes Neto <hpfn@ig.com.br> for the initial patch-set
Diffstat (limited to 'pbuilder-buildpackage')
-rwxr-xr-xpbuilder-buildpackage12
1 files changed, 6 insertions, 6 deletions
diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage
index ead9dc9..d8b41af 100755
--- a/pbuilder-buildpackage
+++ b/pbuilder-buildpackage
@@ -97,7 +97,7 @@ fi
if [ -z "${PBUILDER_BUILD_LOGFILE}" ]; then
if [ "${PKGNAME_LOGFILE}" = "yes" ]; then
- PBUILDER_BUILD_LOGFILE="${BUILDRESULT}/"$(basename "${PACKAGENAME}" .dsc)"${PKGNAME_LOGFILE_EXTENSION}"
+ PBUILDER_BUILD_LOGFILE="${BUILDRESULT}/$(basename "${PACKAGENAME}" .dsc)${PKGNAME_LOGFILE_EXTENSION}"
exec > >(tee "${PBUILDER_BUILD_LOGFILE}") 2>&1
PBUILDER_BUILD_LOGFILE=$(readlink -f "${PBUILDER_BUILD_LOGFILE}")
log "I: Using pkgname logfile"
@@ -135,7 +135,7 @@ else
log "E: pbuilder: Failed chowning to $BUILDUSERNAME:$BUILDUSERNAME"
exit 1;
fi
-if echo "( cd $BUILDDIR; env PATH=\"$PATH\" /usr/bin/dpkg-source -x $(basename $PACKAGENAME) )" | $UNSHARE $CHROOTEXEC env $SUTOUSER ; then
+if echo "( cd $BUILDDIR; env PATH=\"$PATH\" /usr/bin/dpkg-source -x $(basename "$PACKAGENAME") )" | $UNSHARE $CHROOTEXEC env $SUTOUSER ; then
: # success
else
log "E: pbuilder: Failed extracting the source"
@@ -166,14 +166,14 @@ if [ -n "${TIMEOUT_TIME}" ]; then
: Timeout process
sleep "${TIMEOUT_TIME}"
log "I: Terminating build process due to timeout "
- kill ${BUILD_PID} || true
+ kill "${BUILD_PID}" || true
) & # timeout process
- KILL_WAIT_PID="kill "$!" || true; echo \"I: Terminate timeout process\"; "
+ KILL_WAIT_PID="kill $! || true; echo \"I: Terminate timeout process\"; "
else
KILL_WAIT_PID=""
fi
-if ! wait ${BUILD_PID}; then
+if ! wait "${BUILD_PID}"; then
trap umountproc_cleanbuildplace_trap exit sighup sigpipe
eval "${KILL_WAIT_PID}"
log "E: Failed autobuilding of package"
@@ -195,7 +195,7 @@ if [ -d "${BUILDRESULT}" ]; then
chgrp "${BUILDRESULTGID}" "${BUILDPLACE}$BUILDDIR/"*
for FILE in "${BUILDPLACE}$BUILDDIR"/*; do
if [ -f "${FILE}" ]; then
- cp -p ${FILE} "${BUILDRESULT}" || true
+ cp -p "${FILE}" "${BUILDRESULT}" || true
fi
done
for FILE in "${ADDITIONAL_BUILDRESULTS[@]}"; do