fix: add package build and fix disko

This commit is contained in:
David Arnold authored and lassulus committed 2022-11-09 12:21:24 +01:00
1 parent f82656afbd
commit 2a59af78a8
3 files changed
+34 -2

No files matched your search

+10 -2
View File
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail
set -x
readonly libexec_dir="${0%/*}"
# a file with the disko config
declare disko_config
# mount was chosen as the default mode because it's less destructive
mode=mount
nix_args=()
@@ -30,6 +32,11 @@ abort() {
## Main ##
[[ $# -eq 0 ]] && {
showUsage
exit 1
}
while [[ $# -gt 0 ]]; do
case "$1" in
-m | --mode)
@@ -46,10 +53,11 @@ while [[ $# -gt 0 ]]; do
exit 0
;;
*)
if [ -z ${disko_config+x} ] && [ -e $1 ]; then
if [ -z ${disko_config+x} ] && [ -e "$1" ]; then
disko_config=$1
else
showUsage
exit 1
fi
;;
esac