Prefix errors with ERR

This commit is contained in:
0x1eef 2024-05-21 22:33:36 -03:00
parent cae03458b9
commit eb3ebcc627
7 changed files with 13 additions and 13 deletions

View file

@ -17,7 +17,7 @@ require_dependency() {
deps=$1
for dep in $deps; do
if ! which -s "$dep"; then
echo "[x] This command requires ${dep}, but ${dep} wasn't found"
echo "ERR This command requires ${dep}, but ${dep} wasn't found"
exit 1
fi
done

View file

@ -10,7 +10,7 @@ doas="${localbase}"/etc/doas.conf
##
# main
if [ "$(id -u)" != "0" ]; then
echo "[-] This command must be run by root"
echo "ERR This command must be run by root"
exit 1
fi

View file

@ -21,13 +21,13 @@ gitexec()
##
# main
if ! "${libexec}"/isportzap-member; then
echo "[x] This command must be run by a member of the '_portzap' group"
echo "ERR This command must be run by a member of the '_portzap' group"
exit 1
fi
if [ ! -e "${gitdir}/.git" ]; then
echo "[x] ${gitdir} is not a valid git repository."
echo "[x] Try: portzap clone"
echo "ERR ${gitdir} is not a valid git repository."
echo "ERR Try: portzap clone"
exit 1
fi

View file

@ -22,13 +22,13 @@ gitexec()
##
# main
if ! "${libexec}"/isportzap-member; then
echo "[-] This command must be run by a member of the '_portzap' group"
echo "ERR This command must be run by a member of the '_portzap' group"
exit 1
fi
if [ -e "${gitdir}/.git" ]; then
echo "[-] ${gitdir} exists."
echo "[-] Try 'portzap pull'"
echo "ERR ${gitdir} exists."
echo "ERR Try: portzap pull"
exit 1
fi

View file

@ -60,7 +60,7 @@ run_install()
##
# main
if [ "$(id -u)" != "0" ]; then
echo "[-] This command must be run by root"
echo "ERR This command must be run by root"
exit 1
fi

View file

@ -20,14 +20,14 @@ gitexec()
##
# main
if ! "${libexec}"/isportzap-member; then
echo "[x] This command must be run by a member of the '_portzap' group"
echo "ERR This command must be run by a member of the '_portzap' group"
exit 1
fi
if [ ! -e "${gitdir}/.git" ]; then
set +x
echo "[x] ${gitdir} is not a valid git repository."
echo "[x] Try 'portzap clone'"
echo "ERR ${gitdir} is not a valid git repository."
echo "ERR Try 'portzap clone'"
exit 1
fi

View file

@ -25,7 +25,7 @@ erase()
##
# main
if [ "$(id -u)" != "0" ]; then
echo "[-] This command must be run by root"
echo "ERR This command must be run by root"
exit 1
fi