Commit ded0fbe2 authored by Helmut Stult's avatar Helmut Stult

DEV_NAME for Raspberry not declared  - fixed
some little optimizations in dialog-windows
parent 690de44c
......@@ -14,6 +14,7 @@ ROOTPASSWORD=""
SDCARD=""
SDTYP=""
SDDEV=""
DEV_NAME=""
TIMEZONE=""
LOCALE=""
......@@ -238,10 +239,11 @@ prepare_card () {
elif [[ "$DEVICE" = "oc1" ]] || [[ "$DEVICE" = "oc2" ]] || [[ "$DEVICE" = "xu4" ]]; then
# umount SD card
umount ${SDCARD}${SDDEV}1 1> /dev/null 2>&1
umount ${SDCARD}${SDDEV}2 1> /dev/null 2>&1
#Clear first 8mb
dd if=/dev/zero of=${SDCARD} bs=1M count=8 1> /dev/null 2>&1
#partition with a single root partition
parted -s $SDCARD mklabel msdos 1> /dev/null 2>&1
parted -s $SDCARD mkpart primary ext4 0% 100% 1> /dev/null 2>&1
......@@ -257,10 +259,11 @@ prepare_card () {
elif [[ "$DEVICE" = "pinebook" ]] || [[ "$DEVICE" = "sopine" ]]; then
# umount SD card
umount ${SDCARD}${SDDEV}1 1> /dev/null 2>&1
umount ${SDCARD}${SDDEV}2 1> /dev/null 2>&1
#Clear first 8mb
dd if=/dev/zero of=${SDCARD} bs=1M count=8 1> /dev/null 2>&1
#partition with a single root partition
parted -s $SDCARD mklabel msdos 1> /dev/null 2>&1
parted -s $SDCARD mkpart primary ext4 0% 100% 1> /dev/null 2>&1
......@@ -276,10 +279,11 @@ prepare_card () {
elif [[ "$DEVICE" = "rock64" ]] || [[ "$DEVICE" = "rockpro64" ]]; then
# umount SD card
umount ${SDCARD}${SDDEV}1 1> /dev/null 2>&1
umount ${SDCARD}${SDDEV}2 1> /dev/null 2>&1
#Clear first 8mb
dd if=/dev/zero of=${SDCARD} bs=1M count=32 1> /dev/null 2>&1
#partition with a single root partition
parted -s $SDCARD mklabel msdos 1> /dev/null 2>&1
parted -s $SDCARD mkpart primary ext4 32M 100% 1> /dev/null 2>&1
......@@ -347,27 +351,30 @@ fi
# Using Dialog to ask for user input for variables
DEVICE=$(dialog --clear --title "Manjaro ARM Installer" \
--menu "Choose a device:" 20 51 6 \
"rpi3" "Raspberry Pi 3" \
"oc2" "Odroid C2" \
"pinebook" "Pinebook" \
"sopine" "Sopine/Pine64-LTS" \
"rock64" "Rock64" \
"rpi2" "Raspberry Pi 2 (unmaintained)" \
"oc1" "Odroid C1/C1+ (unmaintained)" \
"xu4" "Odroid XU4 (unmaintained)" 3>&1 1>&2 2>&3 3>&-)
--menu "Choose a device:" 20 70 10 \
"pinebook" "Pinebook" \
"rock64" "ROCK64" \
"rockpro64" "ROCKPro64" \
"sopine" "SOPINE / PINE A64-LTS" \
"oc2" "Odroid C2" \
"rpi3" "Raspberry Pi 3" \
"oc1" "Odroid C1/C1+ (unmaintained)" \
"xu4" "Odroid XU4 (unmaintained)" \
"rpi2" "Raspberry Pi 2 (unmaintained)" \
3>&1 1>&2 2>&3 3>&-)
#The if statement makes sure that the user has put in something in the previous prompt. If not (left blank or pressed cancel) the script will end
if [ ! -z "$DEVICE" ]
then
EDITION=$(dialog --clear --title "Manjaro ARM Installer" \
--menu "Choose an edition:" 20 50 5 \
"minimal" "Minimal Edition (Just CLI)" \
"lxqt" "Full LXQT Desktop and apps (lightweight)" \
"kde" "Full KDE/Plasma Desktop (Heavy)" \
"mate" "Full MATE desktop and apps (lightweight, unmaintained)" \
"i3" "Mininal i3 WM with apps (very light)" 3>&1 1>&2 2>&3 3>&-)
--menu "Choose an edition:" 20 70 10 \
"minimal" "Minimal Edition (only CLI)" \
"kde" "Full KDE/Plasma Desktop (Heavy)" \
"lxqt" "Full LXQT Desktop and apps (lightweight)" \
"i3" "Mininal i3 WM with apps (very light)" \
"mate" "Full MATE desktop and apps (lightweight, unmaintained)" \
3>&1 1>&2 2>&3 3>&-)
else
clear
......@@ -426,10 +433,11 @@ while read -r line; do
W+=($line "")
done < <( lsblk -dn -o NAME )
SDCARD=$(dialog --title "Manjaro ARM Installer" \
--menu "Choose your SDCard - Be sure the correct drive is selected!" 20 50 5 \
--menu "Choose your SDCard - Be sure the correct drive is selected!" 20 50 10 \
"${W[@]}" 3>&2 2>&1 1>&3)
# add /dev/ to the selected option above
DEV_NAME=$SDCARD
SDCARD=/dev/$SDCARD
SDTYP=${SDCARD:5:2}
else
......@@ -502,7 +510,7 @@ if [ ! -z "$KEYMAP" ]
then
HOSTNAME=$(dialog --clear --title "Manjaro ARM Installer" \
--inputbox "Enter desired hostname for this system:" 8 50 \
3>&1 1>&2 2>&3 3>&- \
3>&1 1>&2 2>&3 3>&- \
)
else
clear
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment