Skip to content

Commit 0540b17

Browse files
Add files via upload
1 parent d3d4c2f commit 0540b17

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

create_latest_candle_dev.sh

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,9 +1644,9 @@ if [ -d /home/pi/configuration-files ]; then
16441644
mkdir -p /home/pi/candle/configuration-files-backup
16451645
fi
16461646

1647-
cp -r /home/pi/configuration-files/ /home/pi/candle/configuration-files-backup/
1647+
cp -r /home/pi/configuration-files/* /home/pi/candle/configuration-files-backup
16481648

1649-
rsync -vr --inplace /home/pi/candle/configuration-files-backup/ /
1649+
rsync -vr --inplace /home/pi/candle/configuration-files-backup/* /
16501650

16511651
rm -rf /home/pi/configuration-files
16521652

@@ -1674,7 +1674,10 @@ fi
16741674

16751675
#chmod +x /home/pi/candle_first_run.sh
16761676

1677-
1677+
if [ ! -f /home/pi/candle/early.sh ]; then
1678+
echo "ERROR, early.sh is missing?"
1679+
exit 1
1680+
fi
16781681

16791682
# CHMOD THE NEW FILES
16801683
chmod +x /home/pi/candle/early.sh
@@ -2001,11 +2004,20 @@ cd /home/pi
20012004
if [ ! -f /etc/rc.local.bak ]; then
20022005
cp /etc/rc.local /etc/rc.local.bak
20032006
fi
2004-
if [ ! -f /home/pi/candle/early.sh.bak ]; then
2005-
cp /home/pi/candle/early.sh /home/pi/candle/early.sh.bak
2006-
fi
2007-
if [ ! -f /etc/xdg/openbox/autostart.bak ]; then
2008-
cp /etc/xdg/openbox/autostart /etc/xdg/openbox/autostart.bak
2007+
if [ -f /home/pi/candle/early.sh ]; then
2008+
if [ ! -f /home/pi/candle/early.sh.bak ]; then
2009+
cp /home/pi/candle/early.sh /home/pi/candle/early.sh.bak
2010+
fi
2011+
else
2012+
echo
2013+
echo "ERROR, early.sh does not exist!"
2014+
fi
2015+
if [ -f etc/xdg/openbox/autostart ]; then
2016+
if [ ! -f /etc/xdg/openbox/autostart.bak ]; then
2017+
cp /etc/xdg/openbox/autostart /etc/xdg/openbox/autostart.bak
2018+
fi
2019+
else
2020+
echo "ERROR, autostart does not exist"
20092021
fi
20102022

20112023

@@ -2017,7 +2029,6 @@ fi
20172029

20182030

20192031

2020-
20212032
# CLEANUP
20222033

20232034
echo

0 commit comments

Comments
 (0)