housekeeping: shellcheck for tests/functional/compression-levels.sh

This commit is contained in:
Cameron Dart 2024-06-04 13:32:30 -07:00 committed by John Ericson
parent 48520cb71e
commit 58a653dcc6

View file

@ -9,16 +9,16 @@ outPath=$(nix-build dependencies.nix --no-out-link)
cacheURI="file://$cacheDir?compression=xz&compression-level=0" cacheURI="file://$cacheDir?compression=xz&compression-level=0"
nix copy --to $cacheURI $outPath nix copy --to "$cacheURI" "$outPath"
FILESIZES=$(cat ${cacheDir}/*.narinfo | awk '/FileSize: /{sum+=$2}END{print sum}') FILESIZES=$(cat "${cacheDir}"/*.narinfo | awk '/FileSize: /{sum+=$2}END{print sum}')
clearCache clearCache
cacheURI="file://$cacheDir?compression=xz&compression-level=5" cacheURI="file://$cacheDir?compression=xz&compression-level=5"
nix copy --to $cacheURI $outPath nix copy --to "$cacheURI" "$outPath"
FILESIZES2=$(cat ${cacheDir}/*.narinfo | awk '/FileSize: /{sum+=$2}END{print sum}') FILESIZES2=$(cat "${cacheDir}"/*.narinfo | awk '/FileSize: /{sum+=$2}END{print sum}')
[[ $FILESIZES -gt $FILESIZES2 ]] [[ $FILESIZES -gt $FILESIZES2 ]]