2024-05-28 19:43:04 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2017-12-29 22:42:14 +02:00
|
|
|
source common.sh
|
|
|
|
|
|
|
|
clearStore
|
|
|
|
clearCache
|
|
|
|
|
|
|
|
cacheURI="file://$cacheDir?compression=br"
|
|
|
|
|
|
|
|
outPath=$(nix-build dependencies.nix --no-out-link)
|
|
|
|
|
2024-06-03 23:47:35 +03:00
|
|
|
nix copy --to "$cacheURI" "$outPath"
|
2017-12-29 22:42:14 +02:00
|
|
|
|
2024-06-03 23:47:35 +03:00
|
|
|
HASH=$(nix hash path "$outPath")
|
2017-12-29 22:42:14 +02:00
|
|
|
|
|
|
|
clearStore
|
|
|
|
clearCacheCache
|
|
|
|
|
2024-06-03 23:47:35 +03:00
|
|
|
nix copy --from "$cacheURI" "$outPath" --no-check-sigs
|
2017-12-29 22:42:14 +02:00
|
|
|
|
2024-06-03 23:47:35 +03:00
|
|
|
HASH2=$(nix hash path "$outPath")
|
2017-12-29 22:42:14 +02:00
|
|
|
|
2024-06-03 23:47:35 +03:00
|
|
|
[[ $HASH == "$HASH2" ]]
|