Fix a few bugs
Some checks are pending
sourcezap / shellcheck (push) Waiting to run

This commit is contained in:
0x1eef 2024-07-19 03:44:16 -03:00
parent f65748c533
commit cd1e504643
4 changed files with 5 additions and 7 deletions

View file

@ -72,16 +72,14 @@ if [ "$(id -u)" != "0" ]; then
exit 1
fi
set -x
umask ${mode}
cd "${gitdir}"
run_install "-d" "${installdir}"
chmod ${mode} "${installdir}"
set +x
if [ -e "${revfile}" ]; then
perform_update
else
perform_install
fi
"${libexec}"/utils/git/run rev-parse HEAD > "${revfile}"
git rev-parse HEAD > "${revfile}"
printok "install complete"

View file

@ -7,10 +7,10 @@ git()
printok()
{
printf "ok: %s\n" "${msg}" > /dev/stdout
printf "ok: %s\n" "${@}" > /dev/stdout
}
printerr()
{
printf "error: %s\n" "${err}" > /dev/stderr
printf "error: %s\n" "${@}" > /dev/stderr
}

View file

@ -3,7 +3,7 @@ set -e
##
# variables
localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../../..)}
localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../../../..)}
libexec="${localbase}"/libexec/sourcezap
gitdir=$1
commit=$2

View file

@ -3,7 +3,7 @@ set -e
##
# variables
localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../../..)}
localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../../../..)}
libexec="${localbase}"/libexec/sourcezap
gitdir=$1
commit=$2