Fix shellcheck

This commit is contained in:
0x1eef 2024-04-08 15:51:00 -03:00
parent 56db2173dc
commit fccd77e53c
5 changed files with 13 additions and 13 deletions

View file

@ -7,8 +7,8 @@ commit=$2
##
# main
cd ${gitdir}
add=$(git diff --name-only --diff-filter=A ${commit} HEAD)
mod=$(git diff --name-only --diff-filter=M ${commit} HEAD)
echo ${add}
echo ${mod}
cd "${gitdir}"
add=$(git diff --name-only --diff-filter=A "${commit}" HEAD)
mod=$(git diff --name-only --diff-filter=M "${commit}" HEAD)
echo "${add}"
echo "${mod}"

View file

@ -7,5 +7,5 @@ commit=$2
##
# main
cd ${gitdir}
git diff --name-only --diff-filter=D ${commit} HEAD
cd "${gitdir}"
git diff --name-only --diff-filter=D "${commit}" HEAD

View file

@ -6,5 +6,5 @@ gitdir=$1
##
# main
cd ${gitdir}
cd "${gitdir}"
git rev-parse HEAD

View file

@ -23,8 +23,8 @@ perform_update()
for file in ${add}; do
target="${installdir}/${file}"
parent=$(dirname "${target}")
if [ ! -e ${parent} ]; then
mkdir -p ${parent}
if [ ! -e "${parent}" ]; then
mkdir -p "${parent}"
fi
cp "${file}" "${target}"
chown root:_portzap "${target}"
@ -39,7 +39,7 @@ perform_install()
-exec cp -Rfv {} "${installdir}" \; \
-exec chown -R root:_portzap "${installdir}/{}" \;
for path in ${artifacts}; do
rm -rf "${installdir}/${path}"
rm -rf "${installdir:?}/${path}"
done
}
@ -52,4 +52,4 @@ if [ -e "${revfile}" ]; then
else
perform_install
fi
echo $(doas -u _portzap ${libexec}/git-rev ${gitdir}) > ${revfile}
doas -u _portzap ${libexec}/git-rev "${gitdir}" > "${revfile}"

View file

@ -16,7 +16,7 @@ if ! id -u _portzap > /dev/null 2>&1; then
echo "[ok] add _portzap user, group and home directory"
fi
if ! fgrep "${conf}" "${doas}" > /dev/null 2>&1; then
if ! grep -F "${conf}" "${doas}" > /dev/null 2>&1; then
echo "${conf}" >> "${doas}"
echo "[ok] update ${doas}"
fi