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 exit 1
fi fi
set -x
umask ${mode} umask ${mode}
cd "${gitdir}" cd "${gitdir}"
run_install "-d" "${installdir}" run_install "-d" "${installdir}"
chmod ${mode} "${installdir}" chmod ${mode} "${installdir}"
set +x
if [ -e "${revfile}" ]; then if [ -e "${revfile}" ]; then
perform_update perform_update
else else
perform_install perform_install
fi fi
"${libexec}"/utils/git/run rev-parse HEAD > "${revfile}" git rev-parse HEAD > "${revfile}"
printok "install complete" printok "install complete"

View file

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

View file

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

View file

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