mirror of
https://github.com/akpall/akpella.git
synced 2026-02-21 00:26:59 +00:00
Makefile: reset only if config.json is changed
This commit is contained in:
11
Makefile
11
Makefile
@@ -5,11 +5,8 @@ config.json: config.yaml
|
|||||||
--pretty \
|
--pretty \
|
||||||
< config.yaml > config.json
|
< config.yaml > config.json
|
||||||
|
|
||||||
reset: config.json
|
.reset: config.json
|
||||||
if ! [[ -f config.json && -s config.json ]]; then \
|
rm .reset
|
||||||
echo "No config.json" && \
|
|
||||||
exit 1; \
|
|
||||||
fi; \
|
|
||||||
ssh -o ControlMaster=auto -o ControlPath=/tmp/ssh_mux_%h_%p_%r -o ControlPersist=10s -fN akpella && \
|
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") && \
|
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} && \
|
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 \
|
ssh -o ControlPath=/tmp/ssh_mux_%h_%p_%r akpella \
|
||||||
sudo systemctl reboot && \
|
sudo systemctl reboot && \
|
||||||
ssh -o ControlPath=/tmp/ssh_mux_%h_%p_%r -O exit akpella;
|
ssh -o ControlPath=/tmp/ssh_mux_%h_%p_%r -O exit akpella;
|
||||||
|
touch .reset
|
||||||
|
|
||||||
|
reset: .reset
|
||||||
|
.PHONY: reset
|
||||||
|
|
||||||
update:
|
update:
|
||||||
VER=$$(curl -fsSL https://stable.release.flatcar-linux.net/amd64-usr/current/version.txt | grep FLATCAR_VERSION= | cut -d = -f 2) && \
|
VER=$$(curl -fsSL https://stable.release.flatcar-linux.net/amd64-usr/current/version.txt | grep FLATCAR_VERSION= | cut -d = -f 2) && \
|
||||||
|
|||||||
Reference in New Issue
Block a user