liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 39b09df4d751ada26de7d770a7014efa1cd83075
parent ea2f48cfc96796b89e58673e5335b5fe7cadfaf8
Author: Daniel Barlow <dan@telent.net>
Date:   Sat, 20 May 2023 22:30:22 +0100

liminix-rebuild: test if nix-build succeeds

Diffstat:
Mpkgs/min-copy-closure/liminix-rebuild.sh | 12++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/pkgs/min-copy-closure/liminix-rebuild.sh b/pkgs/min-copy-closure/liminix-rebuild.sh @@ -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