wip
This commit is contained in:
1
notes
1
notes
@@ -14,6 +14,7 @@ Wishlist:
|
|||||||
- send canbus messages for current nav instruction / song playing - add my own notices
|
- send canbus messages for current nav instruction / song playing - add my own notices
|
||||||
- start car on speedometer display
|
- start car on speedometer display
|
||||||
- signal windows are rolled down when turning off car
|
- signal windows are rolled down when turning off car
|
||||||
|
- Setup sentry
|
||||||
|
|
||||||
Pie in the sky:
|
Pie in the sky:
|
||||||
- Roll up windows on power off (debug dump canbus)
|
- Roll up windows on power off (debug dump canbus)
|
||||||
|
|||||||
@@ -16,28 +16,12 @@ if [ "$(md5sum /usr/comma/bg.jpg | awk '{print $1}')" != "$(md5sum /data/openpil
|
|||||||
if [ -f /usr/comma/bg.org ]; then
|
if [ -f /usr/comma/bg.org ]; then
|
||||||
sudo cp -f /data/openpilot/shell/bg.jpg /usr/comma/bg.jpg
|
sudo cp -f /data/openpilot/shell/bg.jpg /usr/comma/bg.jpg
|
||||||
fi
|
fi
|
||||||
|
bash /usr/comma/revert_logo.sh
|
||||||
# If file /usr/comma/revert_logo.sh does not exist
|
# If file /usr/comma/revert_logo.sh does not exist
|
||||||
if [ ! -f /usr/comma/revert_logo.sh ]; then
|
if [ ! -f /usr/comma/revert_logo.sh ]; then
|
||||||
sudo cp /data/openpilot/shell/revert_logo.sh /usr/comma/revert_logo.sh
|
sudo cp /data/openpilot/shell/revert_logo.sh /usr/comma/revert_logo.sh
|
||||||
|
if [[ "$(md5sum md5sum /usr/comma/comma.sh | awk '{print $1}')" == "642380ba4c0f00b16e9cf6e613f43eec" ]]; then
|
||||||
# configure comma.sh to start it at startup
|
sudo cp /data/openpilot/shell/comma.sh /usr/comma/comma.sh
|
||||||
|
|
||||||
FILE_PATH="/usr/comma/comma.sh"
|
|
||||||
SEARCH_STRING="bash /usr/comma/revert_logo.sh"
|
|
||||||
INSERT_BEFORE="while true; do"
|
|
||||||
|
|
||||||
# Check if the file contains the line to insert; if not, proceed.
|
|
||||||
if ! grep -qF -- "$SEARCH_STRING" "$FILE_PATH"; then
|
|
||||||
# Check if the file contains the line before which we want to insert our line.
|
|
||||||
if grep -qF -- "$INSERT_BEFORE" "$FILE_PATH"; then
|
|
||||||
# Use awk to insert the line before the specified pattern.
|
|
||||||
sudo cp /usr/comma/comma.sh /tmp/comma.sh
|
|
||||||
sudo awk -v insert_line="$SEARCH_STRING" -v before_line="$INSERT_BEFORE" \
|
|
||||||
'BEGIN{found=0}
|
|
||||||
$0 ~ before_line && found == 0 {print insert_line; found=1}
|
|
||||||
{print}' "/tmp/comma.sh" > "/tmp/comma.sh.tmp" && sudo mv "/tmp/comma.sh.tmp" "$FILE_PATH"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user