forked from lix-project/lix
Cleanup and more specificity around set -e
This commit is contained in:
parent
3839dda2ec
commit
73a57a2f22
|
@ -26,14 +26,11 @@ cleanup() {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for i in $(seq 1 $(sysctl -n hw.ncpu)); do
|
for i in $(seq 1 $(sysctl -n hw.ncpu)); do
|
||||||
sudo /usr/bin/dscl . -delete "/Users/nixbld$i" || true
|
sudo /usr/bin/dscl . -delete "/Users/nixbld$i" || true
|
||||||
done
|
done
|
||||||
sudo /usr/bin/dscl . -delete "/Groups/nixbld" || true
|
sudo /usr/bin/dscl . -delete "/Groups/nixbld" || true
|
||||||
|
|
||||||
|
|
||||||
sudo rm -rf /etc/nix \
|
sudo rm -rf /etc/nix \
|
||||||
/nix \
|
/nix \
|
||||||
/var/root/.nix-profile /var/root/.nix-defexpr /var/root/.nix-channels \
|
/var/root/.nix-profile /var/root/.nix-defexpr /var/root/.nix-channels \
|
||||||
|
@ -41,7 +38,10 @@ cleanup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
verify() {
|
verify() {
|
||||||
|
set +e
|
||||||
output=$(echo "nix-shell -p bash --run 'echo toow | rev'" | bash -l)
|
output=$(echo "nix-shell -p bash --run 'echo toow | rev'" | bash -l)
|
||||||
|
set -e
|
||||||
|
|
||||||
test "$output" = "woot"
|
test "$output" = "woot"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,10 +58,12 @@ verify
|
||||||
|
|
||||||
|
|
||||||
(
|
(
|
||||||
|
set +e
|
||||||
(
|
(
|
||||||
echo "cd $(pwd)"
|
echo "cd $(pwd)"
|
||||||
echo nix-build ./release.nix -A binaryTarball.x86_64-darwin
|
echo nix-build ./release.nix -A binaryTarball.x86_64-darwin
|
||||||
) | bash -l
|
) | bash -l
|
||||||
|
set -e
|
||||||
cp ./result/nix-*.tar.bz2 $scratch/nix.tar.bz2
|
cp ./result/nix-*.tar.bz2 $scratch/nix.tar.bz2
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue