aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xscripts/build.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/build.sh b/scripts/build.sh
index 1cde3f0..b2e0e06 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -5,6 +5,7 @@ set -eu
root="$(git rev-parse --show-toplevel)"
wrong_arg=false
use_dirty=true
+show_trace=false
for arg in "$@"; do
case "$arg" in
@@ -14,6 +15,9 @@ for arg in "$@"; do
--clean)
use_dirty=false
;;
+ --show-trace)
+ show_trace=true
+ ;;
*)
echo "arg '$arg' is not known."
wrong_arg=true
@@ -38,7 +42,12 @@ if [ "$use_dirty" = "false" ]; then
fi
for host in "server2" "server3"; do
- nix build ".#nixosConfigurations.$host.config.system.build.toplevel" --print-out-paths --option max-jobs 1
+ show_trace_arg=""
+ if [ "$show_trace" = true ]; then
+ show_trace_arg="--show-trace"
+ fi
+
+ nix build ".#nixosConfigurations.$host.config.system.build.toplevel" --print-out-paths --option max-jobs 1 $show_trace_arg
result_file="$root/result-$host"
if [ -L "$result_file" ]; then