nixos-rebuild.sh: pass flags to nix-copy-closure whenever possible (#341402)

This commit is contained in:
Jörg Thalheim 2024-10-14 08:10:38 +02:00 committed by GitHub
commit ed47a0bb77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -102,21 +102,32 @@ while [ "$#" -gt 0 ]; do
--use-substitutes|--substitute-on-destination|-s)
copyFlags+=("-s")
;;
-I|--max-jobs|-j|--cores|--builders|--log-format)
--builders)
j="$1"; shift 1
extraBuildFlags+=("$i" "$j")
;;
--accept-flake-config|-j*|--quiet|--print-build-logs|-L|--no-build-output|-Q| --show-trace|--keep-going|-k|--keep-failed|-K|--fallback|--refresh|--repair|--impure|--offline|--no-net)
--I|--max-jobs|-j|--cores|--log-format)
j="$1"; shift 1
extraBuildFlags+=("$i" "$j")
copyFlags+=("$i" "$j")
;;
--accept-flake-config|-j*|--quiet|--print-build-logs|-L|--no-build-output|-Q|--show-trace|--refresh|--impure|--offline|--no-net)
extraBuildFlags+=("$i")
;;
--keep-going|-k|--keep-failed|-K|--fallback|--repair)
extraBuildFlags+=("$i")
copyFlags+=("$i")
;;
--verbose|-v|-vv|-vvv|-vvvv|-vvvvv)
verboseScript="true"
extraBuildFlags+=("$i")
copyFlags+=("$i")
;;
--option)
j="$1"; shift 1
k="$1"; shift 1
extraBuildFlags+=("$i" "$j" "$k")
copyFlags+=("$i" "$j" "$k")
;;
--fast)
buildNix=