Print errors with [x] rather than [-]
This commit is contained in:
parent
9a1826ff87
commit
c0dc4c3a44
5 changed files with 10 additions and 10 deletions
|
@ -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 "[x] This command must be run by root"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -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 "[-] This command requires ${dep}, but ${dep} wasn't found"
|
echo "[x] This command requires ${dep}, but ${dep} wasn't found"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
@ -22,13 +22,13 @@ gitexec()
|
||||||
##
|
##
|
||||||
# main
|
# main
|
||||||
if ! "${libexec}"/issrczap-member; then
|
if ! "${libexec}"/issrczap-member; then
|
||||||
echo "[-] This command must be run by a member of the '_srczap' group"
|
echo "[x] This command must be run by a member of the '_srczap' group"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e "${gitdir}/.git" ]; then
|
if [ -e "${gitdir}/.git" ]; then
|
||||||
echo "[-] ${gitdir} exists."
|
echo "[x] ${gitdir} exists."
|
||||||
echo "[-] Try 'srczap pull'"
|
echo "[x] Try 'srczap pull'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ while true; do
|
||||||
printf "[-] Nothing to do\n"
|
printf "[-] Nothing to do\n"
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
printf "[-] '%s' is not a valid option.\n" "${r}"
|
printf "[x] '%s' is not a valid option.\n" "${r}"
|
||||||
printf "[y|n] "
|
printf "[y|n] "
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
@ -28,7 +28,7 @@ change_branch()
|
||||||
if ! gitexec "checkout ${branch} > /dev/null 2>&1" ||
|
if ! gitexec "checkout ${branch} > /dev/null 2>&1" ||
|
||||||
gitexec "checkout -t ${remote}/${branch} > /dev/null 2>&1"; then
|
gitexec "checkout -t ${remote}/${branch} > /dev/null 2>&1"; then
|
||||||
r="${?}"
|
r="${?}"
|
||||||
echo "[-] 'git checkout' exited with an error"
|
echo "[x] 'git checkout' exited with an error"
|
||||||
exit "${r}"
|
exit "${r}"
|
||||||
else
|
else
|
||||||
echo "[-] Done"
|
echo "[-] Done"
|
||||||
|
@ -39,14 +39,14 @@ change_branch()
|
||||||
##
|
##
|
||||||
# main
|
# main
|
||||||
if ! "${libexec}"/issrczap-member; then
|
if ! "${libexec}"/issrczap-member; then
|
||||||
echo "[-] This command must be run by a member of the '_srczap' group"
|
echo "[x] This command must be run by a member of the '_srczap' group"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -e "${gitdir}/.git" ]; then
|
if [ ! -e "${gitdir}/.git" ]; then
|
||||||
set +x
|
set +x
|
||||||
echo "[-] ${gitdir} is not a valid git repository."
|
echo "[x] ${gitdir} is not a valid git repository."
|
||||||
echo "[-] Try 'srczap clone'"
|
echo "[x] Try 'srczap clone'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue