1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-18 02:58:27 +02:00

* Refactoring.

This commit is contained in:
Eelco Dolstra 2011-07-20 11:50:13 +00:00
parent 0243eea4b9
commit 4bdb51e621
2 changed files with 17 additions and 12 deletions

View file

@ -18,9 +18,7 @@ export NIX_LIBEXEC_DIR=$TEST_ROOT/bin
export NIX_ROOT_FINDER=
export SHARED=$TEST_ROOT/shared
if test -z "$FORCE_NIX_REMOTE"; then
export NIX_REMOTE=
fi
export NIX_REMOTE=
export REAL_BIN_DIR=@bindir@
export REAL_LIBEXEC_DIR=@libexecdir@
@ -77,6 +75,19 @@ clearManifests() {
rm -f $NIX_STATE_DIR/manifests/*
}
startDaemon() {
$nixworker --daemon &
pidDaemon=$!
trap "kill -9 $pidDaemon" EXIT
export NIX_REMOTE=daemon
}
killDaemon() {
kill -9 $pidDaemon
wait $pidDaemon || true
trap "" EXIT
}
fail() {
echo "$1"
exit 1