From a6b2fdf1be1188311da6a71d20665b3672a6a0be Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Sun, 31 Mar 2019 22:49:50 +0200 Subject: [PATCH] Justfile: fallback to default version tmpl on render --- Justfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Justfile b/Justfile index 51314c2..de2e276 100755 --- a/Justfile +++ b/Justfile @@ -115,6 +115,10 @@ update-this-device rebuild-mode='switch': template=nix/os/devices/$(hostname -s)/versions.tmpl.nix outfile=nix/os/devices/$(hostname -s)/versions.nix + if ! test -e ${template}; then + template="$(just _DEFAULT_VERSION_TMPL)" + fi + esh -o ${outfile} ${template} if ! test "$(git diff ${outfile})"; then echo Already on latest versions