diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2019-11-17 15:51:26 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2019-11-17 15:51:26 +0100 |
commit | 5c622466b85435e289427076c8c9b38fea4b767e (patch) | |
tree | 36797ec7ff8605b0c767790142923514b50adacb | |
parent | changes, should whipe out partitions as well (diff) | |
download | arch-installer-5c622466b85435e289427076c8c9b38fea4b767e.tar.gz arch-installer-5c622466b85435e289427076c8c9b38fea4b767e.tar.bz2 arch-installer-5c622466b85435e289427076c8c9b38fea4b767e.tar.xz arch-installer-5c622466b85435e289427076c8c9b38fea4b767e.tar.zst arch-installer-5c622466b85435e289427076c8c9b38fea4b767e.zip |
Condition if there is no existing parts
-rwxr-xr-x | joes-arch-install-UEFI.sh | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/joes-arch-install-UEFI.sh b/joes-arch-install-UEFI.sh index d932b38..7410479 100755 --- a/joes-arch-install-UEFI.sh +++ b/joes-arch-install-UEFI.sh @@ -366,14 +366,16 @@ echo "\ #=================================#" echo && echo basepartc=$(lsblk "$drv" | grep -c part) -i=1 -while [[ $i -le $basepartc ]]; do - towhipe=$(lsblk "$drv" | grep part | awk '{print $1}' | rev | cut -c -1 | rev | awk "NR==$i") - dd if=/dev/zero of="$drv$towhipe" bs=1M status=progress - ((i++)) -done -echo "Whiping disk. This step may take a while." -dd if=/dev/zero of="$drv" bs=1M status=progress +if [ $basepartc -ge 1 ]; then + i=1 + echo "Whiping disk. This step may take a while." + while [[ $i -le $basepartc ]]; do + towhipe=$(lsblk "$drv" | grep part | awk '{print $1}' | rev | cut -c -1 | rev | awk "NR==$i") + dd if=/dev/zero of="$drv$towhipe" bs=1M status=progress > /dev/null + ((i++)) + done +fi +dd if=/dev/zero of="$drv" bs=1M status=progress > /dev/null wipefs --all --force "$drv" fdisk "$drv" << FDISK_INPUT o @@ -433,7 +435,8 @@ clear echo "\ #====== IV. INSTALLING LINUX =====# # # -# 4. Installing base packages # +# 4. Downloading base packages # +# (about 300M) # # # # Please be patient, # # this may take a while # @@ -447,7 +450,7 @@ clear echo "\ #====== IV. INSTALLING LINUX =====# # # -# 4.5 Installing some extras # +# 4.5 Downloading some extras # # # # Please be patient, # # this may take a while # |