diff --git a/Justfile b/Justfile index 951ba68..43f9d03 100755 --- a/Justfile +++ b/Justfile @@ -84,12 +84,12 @@ rebuild-this-device rebuildarg="dry-activate": fi # Re-render the versions of a remote device and rebuild its environment -update-remote-device device target rebuildmode='switch': +update-remote-device devicename target rebuildmode='switch': #!/usr/bin/env bash set -e - template=nix/os/devices/{{device}}/versions.tmpl.nix - outfile=nix/os/devices/{{device}}/versions.nix + template=nix/os/devices/{{ devicename }}/versions.tmpl.nix + outfile=nix/os/devices/{{ devicename }}/versions.nix if ! test -e ${template}; then template="$(just _DEFAULT_VERSION_TMPL)" @@ -101,17 +101,17 @@ update-remote-device device target rebuildmode='switch': exit 0 fi - just -v rebuild-remote-device {{device}} {{target}} dry-activate || { + just -v rebuild-remote-device {{ devicename }} {{target}} dry-activate || { echo ERROR: rebuild in mode 'dry-active' failed after updating ${outfile} exit 1 } - just -v rebuild-remote-device {{ device }} {{ target }} {{ rebuildmode }} || { + just -v rebuild-remote-device {{ devicename }} {{ target }} {{ rebuildmode }} || { echo ERROR: rebuild in mode '{{ rebuildmode }}' failed after updating ${outfile} exit 1 } - git commit -v ${outfile} -m "nix/os/devices/{{ device }}: bump versions" + git commit -v ${outfile} -m "nix/os/devices/{{ devicename }}: bump versions" # Re-render the versions of the current device and rebuild its environment update-this-device rebuild-mode='switch':