2024-05-12 01:19:45 +02:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
|
|
|
##
|
|
|
|
# variables
|
2024-06-01 05:50:47 +02:00
|
|
|
localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/..)}
|
|
|
|
libexec="${localbase}"/libexec/sourcezap
|
2024-05-12 01:19:45 +02:00
|
|
|
|
2024-06-01 05:50:47 +02:00
|
|
|
##
|
|
|
|
# functions
|
2024-07-27 03:36:35 +02:00
|
|
|
# shellcheck source=/dev/null
|
2024-07-19 22:25:50 +02:00
|
|
|
. "${libexec}"/functions/print.sh
|
2024-06-01 05:50:47 +02:00
|
|
|
|
2024-05-12 01:19:45 +02:00
|
|
|
##
|
|
|
|
# main
|
2024-07-25 12:22:04 +02:00
|
|
|
if [ "$(id -u)" = "0" ]; then
|
2024-07-26 16:26:27 +02:00
|
|
|
"${libexec}"/setup/setup-user
|
2024-07-25 12:22:04 +02:00
|
|
|
"${libexec}"/setup/setup-doas
|
|
|
|
else
|
2024-06-01 05:50:47 +02:00
|
|
|
printerr "you must be root"
|
2024-05-12 01:19:45 +02:00
|
|
|
exit 1
|
|
|
|
fi
|