liminix-rebuild: test if nix-build succeeds
This commit is contained in:
parent
ea2f48cfc9
commit
39b09df4d7
|
@ -9,7 +9,11 @@ if [ -z "$target_host" ] ; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
toplevel=$(nix-build "$@" -A outputs.systemConfiguration --no-out-link)
|
||||
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"
|
||||
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 New Issue