Allow upper- and lowercase answers

This commit is contained in:
maride 2017-08-07 18:02:57 +02:00
parent e5707bb776
commit 50aa19f459
4 changed files with 7 additions and 7 deletions

View File

@ -11,7 +11,7 @@ echo " * An internet connection (DHCP or static, idc...)"
echo -n "=> Did you set that up? (y/N) "
read answer
if [ "$answer" != "y" ]; then
if [ "$answer" != "y" ] && [ "$answer" != "Y" ]; then
echo "OK, then do necessary steps and see you soon."
exit 1
fi
@ -51,7 +51,7 @@ do
echo -n "=> Do you want to run flavour '$flavour'? (y/N) "
read answer
if [ "$answer" == "y" ]; then
if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
echo "=> Running flavour '$flavour'..."
pushd $flavour
$flavour/install.sh
@ -66,7 +66,7 @@ done
echo -n "=> Finished \o/ reboot now? (Y/n) "
read answer
if [ "$answer" == "n" ]; then
if [ "$answer" == "n" ] || [ "$answer" == "N" ]; then
exit
fi

View File

@ -4,14 +4,14 @@ echo "~> Going to wipe $blockdevice. Just skip it if you are really sure that th
echo -n "~> Wipe block device? (Y/n) "
read answer
if [ "$answer" == "n" ]; then
if [ "$answer" == "n" ] || [ "$answer" == "N" ]; then
exit 0
fi
echo -n "~> You sure? (y/N) "
read answer
if [ "$answer" == "y" ]; then
if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
echo "~> OK. Be patient now, that could take some time..."
dd if=/dev/zero of=$blockdevice status=progress
exit 0

View File

@ -6,7 +6,7 @@ mkfs.fat -F32 ${blockdevice}1
echo -n "~> Do you want to encrypt root? (Y/n) "
read answer
if [ "$answer" == "n" ]; then
if [ "$answer" == "n" ] || [ "$answer" == "N" ]; then
echo "~> There are close to no reasons to not do this, but hey, you're an adult."
rootformat=${blockdevice}2
else

View File

@ -3,7 +3,7 @@
echo -n "~> Do you want to create an user account? (Y/n) "
read answer
if [ "$answer" == "n" ]; then
if [ "$answer" == "n" ] || [ "$answer" == "N" ]; then
exit 0
else
echo -n " Name of your new user? "