sourcezap/bin/setup-sourcezap

22 lines
371 B
Bash
Executable file

#!/bin/sh
set -e
##
# variables
localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/..)}
libexec="${localbase}"/libexec/sourcezap
##
# functions
# shellcheck source=/dev/null
. "${libexec}"/functions/print.sh
##
# main
if [ "$(id -u)" = "0" ]; then
"${libexec}"/setup/setup-user
"${libexec}"/setup/setup-doas
else
printerr "you must be root"
exit 1
fi