wip
This commit is contained in:
@@ -6,16 +6,24 @@ set -x
|
||||
|
||||
# Check if md5sum of /usr/comma/bg.jpg is not equal to md5sum of /data/openpilot/shell/bg.jpg
|
||||
if [ "$(md5sum /usr/comma/bg.jpg | awk '{print $1}')" != "$(md5sum /data/openpilot/shell/bg.jpg | awk '{print $1}')" ]; then
|
||||
sudo mount -o remount,rw /
|
||||
|
||||
# If /usr/comma/bg.org does not exist
|
||||
if [ ! -f /usr/comma/bg.org ]; then
|
||||
# Check if md5sum of /usr/comma/bg.jpg contains "642380ba4c0f00b16e9cf6e613f43eec"
|
||||
if [[ "$(md5sum /usr/comma/bg.jpg | awk '{print $1}')" == "642380ba4c0f00b16e9cf6e613f43eec" ]]; then
|
||||
sudo mount -o remount,rw /
|
||||
sudo cp /usr/comma/bg.jpg /usr/comma/bg.org
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$(md5sum /usr/comma/bg.org | awk '{print $1}')" != "642380ba4c0f00b16e9cf6e613f43eec" ]]; then
|
||||
sudo mount -o remount,ro /
|
||||
echo failed to backup the correct picture
|
||||
exit
|
||||
fi
|
||||
|
||||
sudo mount -o remount,rw /
|
||||
|
||||
# If /usr/comma/bg.org does exist
|
||||
if [ -f /usr/comma/bg.org ]; then
|
||||
sudo cp -f /data/openpilot/shell/bg.jpg /usr/comma/bg.jpg
|
||||
|
||||
Reference in New Issue
Block a user