Fixed wrong known_arguments

This commit is contained in:
oddlama 2020-04-21 22:04:39 +02:00
parent 61293f149b
commit 119cdd53ba
No known key found for this signature in database
GPG Key ID: 88EA325D51D53908
2 changed files with 3 additions and 3 deletions

View File

@ -194,7 +194,7 @@ expand_ids() {
# swap=<size> create a swap partition with given size, or no swap if set to false # swap=<size> create a swap partition with given size, or no swap if set to false
# type=[efi|bios] defaults to efi. Selects the boot type. # type=[efi|bios] defaults to efi. Selects the boot type.
create_default_disk_layout() { create_default_disk_layout() {
local known_arguments=('+device' '+swap') local known_arguments=('+swap' '?type')
local extra_arguments=() local extra_arguments=()
declare -A arguments; parse_arguments "$@" declare -A arguments; parse_arguments "$@"
@ -238,7 +238,7 @@ create_default_disk_layout() {
# swap=<size> create a swap partition with given size, or no swap if set to false # swap=<size> create a swap partition with given size, or no swap if set to false
# type=[efi|bios] defaults to efi. Selects the boot type. # type=[efi|bios] defaults to efi. Selects the boot type.
create_raid0_luks_layout() { create_raid0_luks_layout() {
local known_arguments=('+device' '+swap') local known_arguments=('+swap' '?type')
local extra_arguments=() local extra_arguments=()
declare -A arguments; parse_arguments "$@" declare -A arguments; parse_arguments "$@"

View File

@ -168,7 +168,7 @@ parse_arguments() {
key="${a%%=*}" key="${a%%=*}"
value="${a#*=}" value="${a#*=}"
if [[ $key == "" ]]; then if [[ $key == "$a" ]]; then
extra_arguments+=("$a") extra_arguments+=("$a")
continue continue
fi fi