gum style --border normal --margin "1" --padding "1 2" --border-foreground 212 "Please enter a hostname"
gum style --border normal --margin "1" --padding "1 2" --border-foreground 212 "Please enter a hostname"
hostname=$(gum input --placeholder "Please enter a hostname")
hostname=$(gum input --placeholder "Please enter a hostname")
# Select disk
clear
clear
gum style --border normal --margin "1" --padding "1 2" --border-foreground 212 "Please select the disk to install to" "$(gum style --foreground 212 'WARNING: This will erease the whole disk')"
gum style --border normal --margin "1" --padding "1 2" --border-foreground 212 "Please select the disk to install to" "$(gum style --foreground 212 'WARNING: This will erease the whole disk')"
disk_dev=$(lsblk -pdo name | grep -v zram | grep -v NAME | grep -v loop | grep -v sr | gum choose --limit 1)
disk_dev=$(lsblk -pdo name | grep -v zram | grep -v NAME | grep -v loop | grep -v sr | gum choose --limit 1)
@ -134,9 +147,11 @@ if [[ $CONTINUE != "true" ]]; then
echo "Exiting. Have a good day!"
echo "Exiting. Have a good day!"
exit
exit
else
else
# Remove config.json if it exists
if [[ $(ls | grep "config.json") ]]; then
if [[ $(ls | grep "config.json") ]]; then
rm config.json
rm config.json
fi
fi
# Make config.json
echo "{
echo "{
\"partition\": {
\"partition\": {
\"device\": \"${disk}\",
\"device\": \"${disk}\",
@ -186,6 +201,7 @@ else
}" > config.json
}" > config.json
fi
fi
# Ask to install
CONTINUE=false
CONTINUE=false
gum confirm "$(gum style --border normal --margin '1' --padding '1 2' --border-foreground 212 "Are you sure you want to install?" "$(gum style --foreground 212 'WARNING: This will erease the whole disk')")" && CONTINUE=true
gum confirm "$(gum style --border normal --margin '1' --padding '1 2' --border-foreground 212 "Are you sure you want to install?" "$(gum style --foreground 212 'WARNING: This will erease the whole disk')")" && CONTINUE=true