Prefix errors with ERR
This commit is contained in:
parent
cae03458b9
commit
eb3ebcc627
7 changed files with 13 additions and 13 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue