home · contact · privacy
Fixes. master
authorChristian Heller <c.heller@plomlompom.de>
Fri, 10 Oct 2025 12:47:52 +0000 (14:47 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Fri, 10 Oct 2025 12:47:52 +0000 (14:47 +0200)
trixie/scripts/lib/ensure_packages_of_tags.sh
trixie/scripts/setup_server.sh

index 1a21e7990d3a19efae61ed999af3ce41b89789ef..d6b92838b94c15630be99339319f7be15af59c3f 100644 (file)
@@ -7,7 +7,7 @@ ensure_packages_of_tags() {
 
     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
+    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)
@@ -18,7 +18,7 @@ ensure_packages_of_tags() {
             printf 'checking if installed … '
             if dpkg-query -Wf '${Package}\n' | grep '^'"${PACKAGE}"'$' > /dev/null; then
                 echo 'yup, keeping!'
             printf 'checking if installed … '
             if dpkg-query -Wf '${Package}\n' | grep '^'"${PACKAGE}"'$' > /dev/null; then
                 echo 'yup, keeping!'
-                apt_digested ${APT_ARG} ${PACKAGE}
+                apt_digested "${APT_ARG}" "${PACKAGE}"
             else
                 echo 'nope, nothing to keep.'
             fi
             else
                 echo 'nope, nothing to keep.'
             fi
@@ -30,12 +30,12 @@ ensure_packages_of_tags() {
             continue
         fi
         local PACKAGES
             continue
         fi
         local PACKAGES
-        PACKAGES=$(cat "${PATH_APTMARK_TAG}" | sed -E 's/#.*//g' | sed -z 's/\n/ /g' | sed 's/  */ /g' | cut -c 2-)
+        PACKAGES=$(sed -E 's/#.*//g' < "${PATH_APTMARK_TAG}" | sed -z 's/\n/ /g' | sed 's/  */ /g' | cut -c 2-)
         if [ -z "${PACKAGES}" ]; then
             echo 'nothing to install.'
         else
             echo "ensuring installation of: ${PACKAGES}"
         if [ -z "${PACKAGES}" ]; then
             echo 'nothing to install.'
         else
             echo "ensuring installation of: ${PACKAGES}"
-            apt_digested ${APT_ARG} ${PACKAGES}
+            apt_digested "${APT_ARG}" "${PACKAGES}"
         fi
     done
     prefixed_msg_exit
         fi
     done
     prefixed_msg_exit
index d030bfbc6e3e8916b8c32534be5e7d3fe94579c8..7b8898c27a738c053789589dd870457330856fb6 100755 (executable)
@@ -27,7 +27,7 @@ CADDY_PASSWORD="$2"
 HOSTNAME="$3"
 FQDN="$4"
 if [ -f "${PATH_REL_DIR_APTMARK}/${HOSTING_APTMARK_TAG}" ]; then
 HOSTNAME="$3"
 FQDN="$4"
 if [ -f "${PATH_REL_DIR_APTMARK}/${HOSTING_APTMARK_TAG}" ]; then
-    INSTALL_TAGS="${INSTALL_TAGS} ${HOSTING_SERVICE}"
+    INSTALL_TAGS="${INSTALL_TAGS} ${HOSTING_APTMARK_TAG}"
 else
     abort 'Unrecognized hosting service.'
 fi
 else
     abort 'Unrecognized hosting service.'
 fi