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) " echo -n "=> Did you set that up? (y/N) "
read answer read answer
if [ "$answer" != "y" ]; then if [ "$answer" != "y" ] && [ "$answer" != "Y" ]; then
echo "OK, then do necessary steps and see you soon." echo "OK, then do necessary steps and see you soon."
exit 1 exit 1
fi fi
@ -51,7 +51,7 @@ do
echo -n "=> Do you want to run flavour '$flavour'? (y/N) " echo -n "=> Do you want to run flavour '$flavour'? (y/N) "
read answer read answer
if [ "$answer" == "y" ]; then if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
echo "=> Running flavour '$flavour'..." echo "=> Running flavour '$flavour'..."
pushd $flavour pushd $flavour
$flavour/install.sh $flavour/install.sh
@ -66,7 +66,7 @@ done
echo -n "=> Finished \o/ reboot now? (Y/n) " echo -n "=> Finished \o/ reboot now? (Y/n) "
read answer read answer
if [ "$answer" == "n" ]; then if [ "$answer" == "n" ] || [ "$answer" == "N" ]; then
exit exit
fi 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) " echo -n "~> Wipe block device? (Y/n) "
read answer read answer
if [ "$answer" == "n" ]; then if [ "$answer" == "n" ] || [ "$answer" == "N" ]; then
exit 0 exit 0
fi fi
echo -n "~> You sure? (y/N) " echo -n "~> You sure? (y/N) "
read answer read answer
if [ "$answer" == "y" ]; then if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
echo "~> OK. Be patient now, that could take some time..." echo "~> OK. Be patient now, that could take some time..."
dd if=/dev/zero of=$blockdevice status=progress dd if=/dev/zero of=$blockdevice status=progress
exit 0 exit 0

View File

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

View File

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