From a0aeba5f4df9c78fe87698fa6556e1bb08cf11e4 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Mon, 15 Apr 2024 13:10:19 -0300 Subject: [PATCH] Fix SC2086 (shellcheck) --- libexec/portzap/portzap-install | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libexec/portzap/portzap-install b/libexec/portzap/portzap-install index 55c804c..1a0ea4c 100755 --- a/libexec/portzap/portzap-install +++ b/libexec/portzap/portzap-install @@ -8,7 +8,6 @@ revfile=$3 artifacts=".git .gitignore .hooks .arcconfig" libexec="/usr/local/libexec/portzap" mode="u=rwX,g=rwX,o=" -flags="-o root -g _portzap -m ${mode} -v" ## # functions @@ -30,9 +29,9 @@ perform_update() target="${installdir}/${file}" parent=$(dirname "${target}") if [ ! -e "${parent}" ]; then - install -d ${flags} "${parent}" + run_install "-d" "${parent}" fi - install ${flags} "${file}" "${target}" + run_install "${file}" "${target}" done } @@ -48,10 +47,15 @@ perform_install() done } +run_install() +{ + install -o root -g _portzap -m "${mode}" -v ${@} +} + ## # main cd "${gitdir}" -install -d ${flags} "${installdir}" +run_install "-d" "${installdir}" if [ -e "${revfile}" ]; then perform_update else