Fix SC2086 (shellcheck)

This commit is contained in:
0x1eef 2024-04-15 13:10:19 -03:00
parent ca9916e4a8
commit a0aeba5f4d

View file

@ -8,7 +8,6 @@ revfile=$3
artifacts=".git .gitignore .hooks .arcconfig" artifacts=".git .gitignore .hooks .arcconfig"
libexec="/usr/local/libexec/portzap" libexec="/usr/local/libexec/portzap"
mode="u=rwX,g=rwX,o=" mode="u=rwX,g=rwX,o="
flags="-o root -g _portzap -m ${mode} -v"
## ##
# functions # functions
@ -30,9 +29,9 @@ perform_update()
target="${installdir}/${file}" target="${installdir}/${file}"
parent=$(dirname "${target}") parent=$(dirname "${target}")
if [ ! -e "${parent}" ]; then if [ ! -e "${parent}" ]; then
install -d ${flags} "${parent}" run_install "-d" "${parent}"
fi fi
install ${flags} "${file}" "${target}" run_install "${file}" "${target}"
done done
} }
@ -48,10 +47,15 @@ perform_install()
done done
} }
run_install()
{
install -o root -g _portzap -m "${mode}" -v ${@}
}
## ##
# main # main
cd "${gitdir}" cd "${gitdir}"
install -d ${flags} "${installdir}" run_install "-d" "${installdir}"
if [ -e "${revfile}" ]; then if [ -e "${revfile}" ]; then
perform_update perform_update
else else