moved pi-power-button install to the end, and added prompt for reboot if changes.

pull/132/head
alanbjohnston 5 years ago committed by GitHub
parent a470228021
commit 3d74dd8c1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -20,22 +20,6 @@ sudo sed -i 's/more information/more\ninformation/g' /etc/motd
sudo sed -i 's/update to/update\nto/g' /etc/motd sudo sed -i 's/update to/update\nto/g' /etc/motd
cd /home/pi/pi-power-button
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
cd /home/pi/CubeSatSim cd /home/pi/CubeSatSim
git pull > .updated git pull > .updated
@ -125,19 +109,31 @@ if [ ! -d "/home/pi/PiSSTVpp" ]; then
cp /home/pi/CubeSatSim/sstv/sstv_image_2_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg cp /home/pi/CubeSatSim/sstv/sstv_image_2_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg
fi fi
echo "You need to reboot to complete the installation. Reboot now (y/n)?" fi
read -r ANS cd /home/pi/pi-power-button
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
echo "You need to reboot to complete this update. Reboot now (y/n)?"
read -r ANS
if [ "$ANS" = "y" ]; then if [ "$ANS" = "y" ]; then
sudo reboot now sudo reboot now
else else
echo "The CubeSatSim software may not work correctly until you reboot." echo "The CubeSatSim software may not work correctly until you reboot."
fi fi
else
fi echo "nothing to do for pi-power-button"
fi

Loading…
Cancel
Save

Powered by TurnKey Linux.