[med-svn] [Git][med-team/community/package_template][master] make "shellcheck clean" the run-unit-test template

Michael R. Crusoe gitlab at salsa.debian.org
Sun Feb 17 11:08:15 GMT 2019


Michael R. Crusoe pushed to branch master at Debian Med / community / package_template


Commits:
5fa390ac by Michael R. Crusoe at 2019-02-17T11:07:27Z
make "shellcheck clean" the run-unit-test template

- - - - -


1 changed file:

- debian/tests/run-unit-test


Changes:

=====================================
debian/tests/run-unit-test
=====================================
@@ -3,13 +3,16 @@ set -e
 
 pkg=#PACKAGENAME#
 
-if [ "$AUTOPKGTEST_TMP" = "" ] ; then
-  AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
-  trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
+if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
+  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+  # Double quote below to expand the temporary directory variable now versus
+  # later is on purpose.
+  # shellcheck disable=SC2064
+  trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
 fi
 
-cp -a /usr/share/doc/${pkg}/examples/* $AUTOPKGTEST_TMP
+cp -a /usr/share/doc/${pkg}/examples/* "${AUTOPKGTEST_TMP}"
 
-cd $AUTOPKGTEST_TMP
+cd "${AUTOPKGTEST_TMP}"
 
 #do_stuff_to_test_package#



View it on GitLab: https://salsa.debian.org/med-team/community/package_template/commit/5fa390aced1e540a585e890a4be679c955b7877a

-- 
View it on GitLab: https://salsa.debian.org/med-team/community/package_template/commit/5fa390aced1e540a585e890a4be679c955b7877a
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190217/9e8b0dd6/attachment.html>


More information about the debian-med-commit mailing list