253: disko cli: allow mode to be disko r=Lassulus a=Lassulus



Co-authored-by: lassulus <git@lassul.us>
This commit is contained in:
bors[bot] 2023-06-04 11:09:47 +00:00 committed by GitHub
commit 92504e2780
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

6
disko
View file

@ -18,7 +18,7 @@ or $0 [options] --flake github:somebody/somewhere
Options:
* -m, --mode mode
set the mode, either create or mount
set the mode, either create, mount, zap_create_mount or disko
* -f, --flake uri
fetch the disko config relative to this flake's root
* --arg name value
@ -93,8 +93,8 @@ while [[ $# -gt 0 ]]; do
shift
done
if ! { [[ $mode = "create" ]] || [[ $mode = "mount" ]] || [[ $mode = "zap_create_mount" ]]; }; then
abort "mode must be either create, mount or zap_create_mount"
if ! { [[ $mode = "create" ]] || [[ $mode = "mount" ]] || [[ $mode = "zap_create_mount" ]] || [[ $mode = "disko" ]]; }; then
abort "mode must be either create, mount, zap_create_mount or disko"
fi
if [[ -n "${flake+x}" ]]; then