From 9263ddff59a35830f21ec1b0fbc33b273345f079 Mon Sep 17 00:00:00 2001 From: ahuston-0 Date: Sun, 26 Jan 2025 12:19:08 -0500 Subject: [PATCH] fix attic array Signed-off-by: ahuston-0 --- utils/attic-push.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/attic-push.bash b/utils/attic-push.bash index a98efb5..fc452fc 100755 --- a/utils/attic-push.bash +++ b/utils/attic-push.bash @@ -8,7 +8,7 @@ set -e # retrieve all paths under 100M nix_paths=$(nix path-info --json --all --closure-size \ | jq 'map_values(.closureSize | select(. < 1e8)) | to_entries | sort_by(.value)' \ - | jq 'map(.key) | join("\n")' | sed 's/\\n/\n/g') + | jq 'map(.key) | join("\n")' | sed -E -e 's/\\n/\n/g;s/^"//g;s/"$//g') readarray -t nix_path_array < <(echo "$nix_paths") @@ -18,5 +18,5 @@ for((i=0; i < ${#nix_path_array[@]}; i+=batchsize)) do part=( "${nix_path_array[@]:i:batchsize}" ) - attic push "${part[@]}" + attic push nix-cache "${part[@]}" done