mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 03:56:01 +01:00
Merge pull request #14075 from fzakaria/fzakaria/shellcheck-functional-dump-db
shellcheck fix functional/dump-db.sh
This commit is contained in:
commit
e3d62f35ea
1 changed files with 8 additions and 9 deletions
|
|
@ -8,19 +8,18 @@ needLocalStore "--dump-db requires a local store"
|
||||||
|
|
||||||
clearStore
|
clearStore
|
||||||
|
|
||||||
path=$(nix-build dependencies.nix -o $TEST_ROOT/result)
|
nix-build dependencies.nix -o "$TEST_ROOT"/result
|
||||||
|
deps="$(nix-store -qR "$TEST_ROOT"/result)"
|
||||||
|
|
||||||
deps="$(nix-store -qR $TEST_ROOT/result)"
|
nix-store --dump-db > "$TEST_ROOT"/dump
|
||||||
|
|
||||||
nix-store --dump-db > $TEST_ROOT/dump
|
rm -rf "$NIX_STATE_DIR"/db
|
||||||
|
|
||||||
rm -rf $NIX_STATE_DIR/db
|
nix-store --load-db < "$TEST_ROOT"/dump
|
||||||
|
|
||||||
nix-store --load-db < $TEST_ROOT/dump
|
deps2="$(nix-store -qR "$TEST_ROOT"/result)"
|
||||||
|
|
||||||
deps2="$(nix-store -qR $TEST_ROOT/result)"
|
|
||||||
|
|
||||||
[ "$deps" = "$deps2" ];
|
[ "$deps" = "$deps2" ];
|
||||||
|
|
||||||
nix-store --dump-db > $TEST_ROOT/dump2
|
nix-store --dump-db > "$TEST_ROOT"/dump2
|
||||||
cmp $TEST_ROOT/dump $TEST_ROOT/dump2
|
cmp "$TEST_ROOT"/dump "$TEST_ROOT"/dump2
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue