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
|
deps=$1
|
||||||
for dep in $deps; do
|
for dep in $deps; do
|
||||||
if ! which -s "$dep"; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
@ -10,7 +10,7 @@ doas="${localbase}"/etc/doas.conf
|
||||||
##
|
##
|
||||||
# main
|
# main
|
||||||
if [ "$(id -u)" != "0" ]; then
|
if [ "$(id -u)" != "0" ]; then
|
||||||
echo "[-] This command must be run by root"
|
echo "ERR This command must be run by root"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -21,13 +21,13 @@ gitexec()
|
||||||
##
|
##
|
||||||
# main
|
# main
|
||||||
if ! "${libexec}"/isportzap-member; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -e "${gitdir}/.git" ]; then
|
if [ ! -e "${gitdir}/.git" ]; then
|
||||||
echo "[x] ${gitdir} is not a valid git repository."
|
echo "ERR ${gitdir} is not a valid git repository."
|
||||||
echo "[x] Try: portzap clone"
|
echo "ERR Try: portzap clone"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -22,13 +22,13 @@ gitexec()
|
||||||
##
|
##
|
||||||
# main
|
# main
|
||||||
if ! "${libexec}"/isportzap-member; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e "${gitdir}/.git" ]; then
|
if [ -e "${gitdir}/.git" ]; then
|
||||||
echo "[-] ${gitdir} exists."
|
echo "ERR ${gitdir} exists."
|
||||||
echo "[-] Try 'portzap pull'"
|
echo "ERR Try: portzap pull"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ run_install()
|
||||||
##
|
##
|
||||||
# main
|
# main
|
||||||
if [ "$(id -u)" != "0" ]; then
|
if [ "$(id -u)" != "0" ]; then
|
||||||
echo "[-] This command must be run by root"
|
echo "ERR This command must be run by root"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -20,14 +20,14 @@ gitexec()
|
||||||
##
|
##
|
||||||
# main
|
# main
|
||||||
if ! "${libexec}"/isportzap-member; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -e "${gitdir}/.git" ]; then
|
if [ ! -e "${gitdir}/.git" ]; then
|
||||||
set +x
|
set +x
|
||||||
echo "[x] ${gitdir} is not a valid git repository."
|
echo "ERR ${gitdir} is not a valid git repository."
|
||||||
echo "[x] Try 'portzap clone'"
|
echo "ERR Try 'portzap clone'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ erase()
|
||||||
##
|
##
|
||||||
# main
|
# main
|
||||||
if [ "$(id -u)" != "0" ]; then
|
if [ "$(id -u)" != "0" ]; then
|
||||||
echo "[-] This command must be run by root"
|
echo "ERR This command must be run by root"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue