Files
Brandon T. Kowalski daa864c3b3 feat: add update preamble to all launch scripts
Each launch script now checks for a .update staging directory after
cd'ing to the binary dir. If present, it copies the contents over the
install and removes the staging dir before starting grout. Also cleans
up leftover update artifacts on startup.
2026-03-26 18:48:58 -04:00

23 lines
398 B
Bash

#!/bin/bash
CUR_DIR="$(dirname "$0")"
FLAG_FILE="./es_restart_request"
cd "$CUR_DIR/Grout" || exit 1
# Apply pending update
if [ -d "../.update" ]; then
cp -rf ../.update/* ..
rm -rf ../.update
fi
export CFW=BATOCERA
export LD_LIBRARY_PATH="$CUR_DIR/Grout/lib:$LD_LIBRARY_PATH"
./grout
if [ -f "$FLAG_FILE" ]; then
rm -f "$FLAG_FILE"
batocera-es-swissknife --restart
fi
exit 0