Simplify control flow

This commit is contained in:
0x1eef 2024-05-11 21:36:28 -03:00
parent d5f998ee8f
commit 6c1aebcbde

View file

@ -38,18 +38,17 @@ while true; do
read -r r
if [ "${r}" = "1" ]; then
erase "${gitdir}"
exit
elif [ "${r}" = "2" ]; then
erase "${installdir}"
exit
elif [ "${r}" = "3" ]; then
erase "${gitdir}"
erase "${installdir}"
exit
elif [ "${r}" = "4" ]; then
exit
break
else
printf "%s is not a valid option\n" "${r}"
printf "1-4: "
continue
fi
exit
done