forked from c3d2/nix-config
modules/autoupdate: catch $NEW==null
This commit is contained in:
parent
efad5c87c1
commit
18b68306d0
|
@ -28,7 +28,7 @@
|
|||
script = ''
|
||||
OLD=$(readlink /run/current-system)
|
||||
NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/x86_64-linux.$(hostname)/latest | jq -r .buildoutputs.out.path)
|
||||
if [ -z "$NEW" ]; then
|
||||
if [ -z "$NEW" ] || [ "$NEW" = "null" ]; then
|
||||
echo "Unable to obtain updated system"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -68,7 +68,7 @@
|
|||
OLD=$(readlink /run/current-system)
|
||||
echo Current system: $(basename $OLD)
|
||||
NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/x86_64-linux.$(hostname)/latest | ${pkgs.jq}/bin/jq -r .buildoutputs.out.path)
|
||||
if [ -z "$NEW" ]; then
|
||||
if [ -z "$NEW" ] || [ "$NEW" = "null" ]; then
|
||||
echo "Unable to obtain updated system"
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user