home · contact · privacy
Fix. master
authorChristian Heller <c.heller@plomlompom.de>
Fri, 10 Oct 2025 13:03:20 +0000 (15:03 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Fri, 10 Oct 2025 13:03:20 +0000 (15:03 +0200)
trixie/scripts/lib/ensure_packages_of_tags.sh

index d6b92838b94c15630be99339319f7be15af59c3f..ceda292cc358bf97fb0986b23676148eaeec556f 100644 (file)
@@ -5,20 +5,23 @@
 ensure_packages_of_tags() {
     prefixed_msg_init 'ensure_packages_of_tags'
 
 ensure_packages_of_tags() {
     prefixed_msg_init 'ensure_packages_of_tags'
 
+    # shellcheck disable=SC2089
     local APT_ARG="-q -q -o 'Dpkg::Options::=--force-confnew' install"
     local TAG
     local APT_ARG="-q -q -o 'Dpkg::Options::=--force-confnew' install"
     local TAG
-    for TAG in "$@"; do
+    # shellcheck disable=SC2068
+    for TAG in $@; do
         prefixed_msg_no_nl "For tag '${TAG}', "
         local TEST
         TEST=$(echo "${TAG}" | cut -d':' -f1)
         prefixed_msg_no_nl "For tag '${TAG}', "
         local TEST
         TEST=$(echo "${TAG}" | cut -d':' -f1)
-       # TODO get rid of this one
+        # TODO get rid of this one
         if [ "${TEST}" = 'keep_if_installed' ]; then
             local PACKAGE
             PACKAGE=$(echo "${TAG}" | cut -d':' -f2)
             printf 'checking if installed … '
             if dpkg-query -Wf '${Package}\n' | grep '^'"${PACKAGE}"'$' > /dev/null; then
                 echo 'yup, keeping!'
         if [ "${TEST}" = 'keep_if_installed' ]; then
             local PACKAGE
             PACKAGE=$(echo "${TAG}" | cut -d':' -f2)
             printf 'checking if installed … '
             if dpkg-query -Wf '${Package}\n' | grep '^'"${PACKAGE}"'$' > /dev/null; then
                 echo 'yup, keeping!'
-                apt_digested "${APT_ARG}" "${PACKAGE}"
+                # shellcheck disable=SC2090,SC2086
+                apt_digested ${APT_ARG} ${PACKAGE}
             else
                 echo 'nope, nothing to keep.'
             fi
             else
                 echo 'nope, nothing to keep.'
             fi
@@ -35,7 +38,8 @@ ensure_packages_of_tags() {
             echo 'nothing to install.'
         else
             echo "ensuring installation of: ${PACKAGES}"
             echo 'nothing to install.'
         else
             echo "ensuring installation of: ${PACKAGES}"
-            apt_digested "${APT_ARG}" "${PACKAGES}"
+            # shellcheck disable=SC2090,SC2086
+            apt_digested ${APT_ARG} ${PACKAGES}
         fi
     done
     prefixed_msg_exit
         fi
     done
     prefixed_msg_exit