gum style --border normal --margin "1" --padding "1 2" --border-foreground 212 "Please enter a hostname"
hostname=$(gum input --placeholder "Please enter a hostname")
# Select disk
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')"
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!"
exit
else
# Remove config.json if it exists
if [[ $(ls | grep "config.json") ]]; then
rm config.json
fi
# Make config.json
echo "{
\"partition\": {
\"device\": \"${disk}\",
@ -186,6 +201,7 @@ else
}" > config.json
fi
# Ask to install
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