aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild16
1 files changed, 8 insertions, 8 deletions
diff --git a/build b/build
index c302bacdb6a..1b04c71fb33 100755
--- a/build
+++ b/build
@@ -3,11 +3,11 @@
set -eo pipefail
HOST=$(hostname)
-DIR=$(realpath $(dirname $0))
+DIR=$(realpath "$(dirname "$0")")
OUT=$(mktemp -du)
ROOT="$DIR/roots/$HOST.nix"
-echo Active tree: $DIR
+echo Active tree: "$ROOT"
## Build the libkookie tree
function build {
@@ -17,21 +17,21 @@ function build {
-I "nixpkgs=$DIR/nixpkgs" \
-I "nixpkgs-overlays=$DIR/overlays" \
-I "home-manager=$DIR/home-manager" \
- --out-link "$OUT" $ARGV
+ --out-link "$OUT" "$@"
}
## Build and output build path for debugging
function debug {
- build $ROOT
- echo "Build path: $D-18"
+ build "$ROOT"
+ echo "Build path: $OUT"
exit 0
}
## Build and switch to the new configuration (requires root)
function switch {
- build $ROOT
+ build "$ROOT"
nix-env -p /nix/var/nix/profiles/system --set "$OUT"
- $OUT/bin/switch-to-configuration switch
+ "$OUT"/bin/switch-to-configuration switch
}
case "$1" in
@@ -40,4 +40,4 @@ case "$1" in
*) build ;;
esac
-rm -rf $OUT*
+rm -rf "$OUT"*