fix
This commit is contained in:
parent
72054dd06b
commit
1fb3415e2f
1 changed files with 19 additions and 1 deletions
|
@ -33,7 +33,7 @@ prompt() {
|
|||
# shellcheck disable=SC2086,SC2048
|
||||
printf "\n%s (Accepted values: %s)\n" "$prompt" "$(join_by ' | ' ${requiments[*]})"
|
||||
while :; do
|
||||
read -rep "> " -i "$default" "${variable?}"
|
||||
read -rep "> " -i "$default" "${variable?}"
|
||||
[[ "${requiments[0]}" == "null" ]] && break
|
||||
[[ -n ${!variable} && ${requiments[*]} =~ ${!variable} ]] && break
|
||||
printf "Invalid option\n"
|
||||
|
@ -105,6 +105,24 @@ while :; do
|
|||
}
|
||||
done
|
||||
|
||||
# Pre-installation
|
||||
part_boot=",+1G,C12A7328-F81F-11D2-BA4B-00A0C93EC93B"
|
||||
part_root=","
|
||||
root_dev=$(echo ${devices[$root_drive]} | cut -d' ' -f 1)
|
||||
[[ "${want_home:-0}" -eq 1 ]] &&
|
||||
home_dev=$(echo ${devices[$home_drive]} | cut -d' ' -f 1)
|
||||
|
||||
## Partition disk(s)
|
||||
printf "label: GPT\n$part_boot\n$part_root" | sfdisk "$root_dev"
|
||||
[[ "${home_fmt:-0}" -eq 1 ]] &&
|
||||
printf "label: GPT\n," | sfdisk "$home_dev"
|
||||
|
||||
## Format disk(s)
|
||||
mkfs.fat -F 32 "$root_dev"1
|
||||
mkfs.btrfs -f "$root_dev"2
|
||||
[[ "${home_fmt:-0}" -eq 1 ]] && {
|
||||
mkfs.btrfs -f "$home_dev"1
|
||||
}
|
||||
|
||||
## Configure root btrfs
|
||||
mount --mkdir "$root_dev"2 /mnt
|
||||
|
|
Loading…
Reference in a new issue