aboutsummaryrefslogtreecommitdiffstats
path: root/arch-install-UEFI.sh
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2019-11-15 16:42:49 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2019-11-15 16:42:49 +0100
commit27a7c8bf081d23d88c82012252d5b2cb1a27a051 (patch)
treed7a5e41e2ed8205f4fd0126d404383fb10a38e98 /arch-install-UEFI.sh
parentread -r test (diff)
downloadarch-installer-27a7c8bf081d23d88c82012252d5b2cb1a27a051.tar.gz
arch-installer-27a7c8bf081d23d88c82012252d5b2cb1a27a051.tar.bz2
arch-installer-27a7c8bf081d23d88c82012252d5b2cb1a27a051.tar.xz
arch-installer-27a7c8bf081d23d88c82012252d5b2cb1a27a051.tar.zst
arch-installer-27a7c8bf081d23d88c82012252d5b2cb1a27a051.zip
Shellchecking
Diffstat (limited to '')
-rwxr-xr-xarch-install-UEFI.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/arch-install-UEFI.sh b/arch-install-UEFI.sh
index 95c1012..9462923 100755
--- a/arch-install-UEFI.sh
+++ b/arch-install-UEFI.sh
@@ -52,8 +52,8 @@ if [ ! -r /sys/firmware/efi/efivars ]; then
fi
clear
echo "Verifying that your are connected to the Internet, please wait..."
-wget -q --spider https://google.com
-if [ ! $? -eq 0 ]; then
+
+if wget -q --spider https://google.com ; then
clear
echo "X=X=X=X=X=X=X ERROR X=X=X=X=X=X=X=X"
echo "X X"
@@ -76,7 +76,7 @@ else
echo "Success!"
echo
echo "Press [retrun] key to continue"
- read
+ read -r
fi
# ================================================================================================ #
@@ -95,9 +95,9 @@ while [[ $answr != y && $answr != Y && $answr != yes && $answr != Yes && $answr
echo "# 1. Drive to be used #"
echo "# #"
echo "#=================================#"
- while [[ $drvnm == "" || $drvnm -gt $(lsblk | grep disk | wc -l) || $drvnm -le 0 ]]; do
+ while [[ $drvnm == "" || $drvnm -gt $(lsblk | grep -c disk) || $drvnm -le 0 ]]; do
echo && echo
- dn=$(lsblk | grep disk | wc -l)
+ dn=$(lsblk | grep -c disk)
id=1
lsblk
echo && echo
@@ -108,12 +108,12 @@ while [[ $answr != y && $answr != Y && $answr != yes && $answr != Yes && $answr
((id++))
done
echo -n "> "
- read drvnm
+ read -r drvnm
if [[ $drvnm == "" ]]; then
echo && echo
echo "Can't be empty, retrying..."
fi
- if [[ $drvnm > $(lsblk | grep disk | wc -l) ]]; then
+ if [[ $drvnm -gt $(lsblk | grep -c disk) ]]; then
echo && echo
echo "Illegal value, please choose something reasonable. Retrying..."
fi
@@ -140,7 +140,7 @@ while [[ $answr != y && $answr != Y && $answr != yes && $answr != Yes && $answr
echo "Please enter your swap partition disired size:"
echo "_G"
echo -n "> "
- read swps
+ read -r swps
if [[ $swps == "" ]]; then
echo && echo
echo "Can't be empty, retrying..."
@@ -159,7 +159,7 @@ while [[ $answr != y && $answr != Y && $answr != yes && $answr != Yes && $answr
echo "Please enter your root partition disired size:"
echo "__G"
echo -n "> "
- read rts
+ read -r rts
if [[ $rts == "" ]]; then
echo && echo
echo "Can't be empty, retrying..."
@@ -182,13 +182,13 @@ while [[ $answr != y && $answr != Y && $answr != yes && $answr != Yes && $answr
echo && echo
echo "Is that correct? [y/N]"
echo -n "> "
- read answr
+ read -r answr
if [[ $answr != y && $answr != Y && $answr != yes && $answr != Yes && $answr != YES ]]; then
echo && echo
echo "Retrying..."
echo
echo "Press [retrun] key to continue"
- read
+ read -r
fi
done