From 5faccc4cabedb10d5fa2b9d7359daa571db15e5a Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Fri, 6 Sep 2019 12:31:28 +0200 Subject: [PATCH] Justfile: dont try to render templates when offline --- Justfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Justfile b/Justfile index 55f8fd9..fea5551 100755 --- a/Justfile +++ b/Justfile @@ -25,8 +25,12 @@ _device recipe dir +moreargs="": _render_templates: #!/usr/bin/env bash set -ex - source $(just -v _get_nix_path {{invocation_directory()}}/nix/variables/versions.nix) - nix/scripts/pre-eval-fixed.sh nix/home-manager/profiles/dotfiles/vcsh{.tmpl,}.nix + if ! ip route get 0.0.0.1; then + echo No route to WAN. Skipping template rendering... + else + source $(just -v _get_nix_path {{invocation_directory()}}/nix/variables/versions.nix) + nix/scripts/pre-eval-fixed.sh nix/home-manager/profiles/dotfiles/vcsh{.tmpl,}.nix + fi _rebuild-device dir rebuildarg="dry-activate" +moreargs="": _render_templates #!/usr/bin/env bash