mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 07:11:24 +01:00
simplify attic call
The comment isn't really needed since the reasoning applies to the other instances of readarray and here-strings too, and the IFS bit is unnecessary.
This commit is contained in:
parent
85b9080c77
commit
7fc39b1845
1 changed files with 7 additions and 12 deletions
|
|
@ -15,11 +15,8 @@ just() {
|
|||
return
|
||||
fi
|
||||
|
||||
nix run --inputs-from . attic -- \
|
||||
login \
|
||||
"$ATTIC_SERVER" \
|
||||
"$ATTIC_ENDPOINT" \
|
||||
"$ATTIC_TOKEN"
|
||||
nix run --inputs-from . attic#default -- \
|
||||
login "$ATTIC_SERVER" "$ATTIC_ENDPOINT" "$ATTIC_TOKEN"
|
||||
|
||||
# Find all output paths of the installables and their build dependencies
|
||||
readarray -t derivations < <(nix path-info --derivation "$@")
|
||||
|
|
@ -29,15 +26,13 @@ just() {
|
|||
<<< "${derivations[*]}"
|
||||
)
|
||||
|
||||
# Upload them to Attic
|
||||
#
|
||||
# Use `xargs` and a here-string because something would probably explode if
|
||||
# several thousand arguments got passed to a command at once. Hopefully no
|
||||
# store paths include a newline in them.
|
||||
# Upload them to Attic. It seems to insist on newlines to separate the
|
||||
# paths.
|
||||
(
|
||||
IFS=$'\n'
|
||||
nix shell --inputs-from . attic -c xargs \
|
||||
attic push "$ATTIC_SERVER:$ATTIC_CACHE" <<< "${cache[*]}"
|
||||
nix run --inputs-from . attic#default -- \
|
||||
push --stdin --no-closure "$ATTIC_SERVER:$ATTIC_CACHE" \
|
||||
<<< "${cache[*]}"
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue