Fix shellcheck
This commit is contained in:
parent
56db2173dc
commit
fccd77e53c
5 changed files with 13 additions and 13 deletions
|
@ -7,8 +7,8 @@ commit=$2
|
||||||
|
|
||||||
##
|
##
|
||||||
# main
|
# main
|
||||||
cd ${gitdir}
|
cd "${gitdir}"
|
||||||
add=$(git diff --name-only --diff-filter=A ${commit} HEAD)
|
add=$(git diff --name-only --diff-filter=A "${commit}" HEAD)
|
||||||
mod=$(git diff --name-only --diff-filter=M ${commit} HEAD)
|
mod=$(git diff --name-only --diff-filter=M "${commit}" HEAD)
|
||||||
echo ${add}
|
echo "${add}"
|
||||||
echo ${mod}
|
echo "${mod}"
|
||||||
|
|
|
@ -7,5 +7,5 @@ commit=$2
|
||||||
|
|
||||||
##
|
##
|
||||||
# main
|
# main
|
||||||
cd ${gitdir}
|
cd "${gitdir}"
|
||||||
git diff --name-only --diff-filter=D ${commit} HEAD
|
git diff --name-only --diff-filter=D "${commit}" HEAD
|
||||||
|
|
|
@ -6,5 +6,5 @@ gitdir=$1
|
||||||
|
|
||||||
##
|
##
|
||||||
# main
|
# main
|
||||||
cd ${gitdir}
|
cd "${gitdir}"
|
||||||
git rev-parse HEAD
|
git rev-parse HEAD
|
||||||
|
|
|
@ -23,8 +23,8 @@ perform_update()
|
||||||
for file in ${add}; do
|
for file in ${add}; do
|
||||||
target="${installdir}/${file}"
|
target="${installdir}/${file}"
|
||||||
parent=$(dirname "${target}")
|
parent=$(dirname "${target}")
|
||||||
if [ ! -e ${parent} ]; then
|
if [ ! -e "${parent}" ]; then
|
||||||
mkdir -p ${parent}
|
mkdir -p "${parent}"
|
||||||
fi
|
fi
|
||||||
cp "${file}" "${target}"
|
cp "${file}" "${target}"
|
||||||
chown root:_portzap "${target}"
|
chown root:_portzap "${target}"
|
||||||
|
@ -39,7 +39,7 @@ perform_install()
|
||||||
-exec cp -Rfv {} "${installdir}" \; \
|
-exec cp -Rfv {} "${installdir}" \; \
|
||||||
-exec chown -R root:_portzap "${installdir}/{}" \;
|
-exec chown -R root:_portzap "${installdir}/{}" \;
|
||||||
for path in ${artifacts}; do
|
for path in ${artifacts}; do
|
||||||
rm -rf "${installdir}/${path}"
|
rm -rf "${installdir:?}/${path}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,4 +52,4 @@ if [ -e "${revfile}" ]; then
|
||||||
else
|
else
|
||||||
perform_install
|
perform_install
|
||||||
fi
|
fi
|
||||||
echo $(doas -u _portzap ${libexec}/git-rev ${gitdir}) > ${revfile}
|
doas -u _portzap ${libexec}/git-rev "${gitdir}" > "${revfile}"
|
||||||
|
|
|
@ -16,7 +16,7 @@ if ! id -u _portzap > /dev/null 2>&1; then
|
||||||
echo "[ok] add _portzap user, group and home directory"
|
echo "[ok] add _portzap user, group and home directory"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! fgrep "${conf}" "${doas}" > /dev/null 2>&1; then
|
if ! grep -F "${conf}" "${doas}" > /dev/null 2>&1; then
|
||||||
echo "${conf}" >> "${doas}"
|
echo "${conf}" >> "${doas}"
|
||||||
echo "[ok] update ${doas}"
|
echo "[ok] update ${doas}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue