fix: add package build and fix disko

This commit is contained in:
David Arnold 2022-11-05 14:25:08 -05:00 committed by lassulus
parent f82656afbd
commit 2a59af78a8
3 changed files with 34 additions and 2 deletions

12
disko
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