From c3baf77935b70161bd5d3dc4e458a94387cb0162 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Thu, 10 Jun 2021 17:22:41 -0400 Subject: [PATCH] added test to see if pi-power-button changed before reinstalling --- update | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/update b/update index c96f5bd6..4bb5a436 100755 --- a/update +++ b/update @@ -19,9 +19,17 @@ sudo sed -i 's/more information/more\ninformation/g' /etc/motd sudo sed -i 's/update to/update\nto/g' /etc/motd -cd /home/pi/pi-power-button && git pull +cd /home/pi/pi-power-button -script/install +git pull .updated_p + + grep 'changed' /home/pi/pi-power-button/.updated_p + if [[ $(grep 'changed' /home/pi/pi-power-button/.updated_p) ]]; then + echo "reinstalling pi-power-button" + script/install + else + echo "nothing to do for pi-power-button" + fi cd