From d091d71e8cf9795d4f192acd43a67376a36ac29d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allen-Kristjan=20P=C3=A4ll?= Date: Sun, 8 Feb 2026 06:05:57 +0200 Subject: [PATCH] Makefile: reset only if config.json is changed --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 9e03c25..9e58776 100644 --- a/Makefile +++ b/Makefile @@ -5,11 +5,8 @@ config.json: config.yaml --pretty \ < config.yaml > config.json -reset: config.json - if ! [[ -f config.json && -s config.json ]]; then \ - echo "No config.json" && \ - exit 1; \ - fi; \ +.reset: config.json + rm .reset ssh -o ControlMaster=auto -o ControlPath=/tmp/ssh_mux_%h_%p_%r -o ControlPersist=10s -fN akpella && \ TEMPDIR=$$(ssh -o ControlPath=/tmp/ssh_mux_%h_%p_%r akpella "cd /tmp && mktemp -d") && \ scp -o ControlPath=/tmp/ssh_mux_%h_%p_%r config.json akpella:$${TEMPDIR} && \ @@ -21,6 +18,10 @@ reset: config.json ssh -o ControlPath=/tmp/ssh_mux_%h_%p_%r akpella \ sudo systemctl reboot && \ ssh -o ControlPath=/tmp/ssh_mux_%h_%p_%r -O exit akpella; + touch .reset + +reset: .reset +.PHONY: reset update: VER=$$(curl -fsSL https://stable.release.flatcar-linux.net/amd64-usr/current/version.txt | grep FLATCAR_VERSION= | cut -d = -f 2) && \