forked from DGNum/liminix
liminix-rebuild: test if nix-build succeeds
This commit is contained in:
parent
ea2f48cfc9
commit
39b09df4d7
1 changed files with 8 additions and 4 deletions
|
@ -9,7 +9,11 @@ if [ -z "$target_host" ] ; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
toplevel=$(nix-build "$@" -A outputs.systemConfiguration --no-out-link)
|
||||
if toplevel=$(nix-build "$@" -A outputs.systemConfiguration --no-out-link); then
|
||||
echo systemConfiguration $toplevel
|
||||
min-copy-closure $target_host $toplevel
|
||||
$ssh_command $target_host cp -v -fP $toplevel/bin/* $toplevel/etc/* /persist
|
||||
$ssh_command $target_host "sync; source /etc/profile; reboot"
|
||||
else
|
||||
echo Rebuild failed
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue