portzap/libexec/portzap/utils/git/run
0x1eef a38962782f
Some checks are pending
portzap / shellcheck (push) Waiting to run
Add libexec/portzap/utils/get-umask
2024-08-19 23:21:26 -03:00

15 lines
277 B
Bash

#!/bin/sh
set -e
##
# variables
localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../../../..)}
libexec="${localbase}"/libexec/portzap
git=$(which git)
mask=$("${libexec}"/utils/get-umask)
##
# main
doas -n \
-u _portzap \
/bin/sh -c "umask ${mask}; ${git} ${*}"