Fix: Always sync app code on container start

- Changed entrypoint to always copy/update code
- Enables container updates without manual intervention
- Fixes issue where code changes weren't reflected
This commit is contained in:
shane keulen
2025-11-02 00:35:03 -04:00
parent 28a0013bee
commit d0eaf387b2

View File

@@ -1,13 +1,11 @@
#!/bin/bash
set -e
# Copy RGSX app code to the mounted volume if it doesn't exist yet
if [ ! -f "/userdata/roms/ports/RGSX/rgsx_web.py" ]; then
echo "Initializing RGSX in /userdata/roms/ports/RGSX..."
mkdir -p /userdata/roms/ports
cp -r /app/RGSX /userdata/roms/ports/
echo "RGSX app code initialized!"
fi
# Always sync RGSX app code to the mounted volume (for updates)
echo "Syncing RGSX app code to /userdata/roms/ports/RGSX..."
mkdir -p /userdata/roms/ports/RGSX
cp -rf /app/RGSX/* /userdata/roms/ports/RGSX/
echo "RGSX app code synced!"
# Create Batocera folder structure only if folders don't exist
[ ! -d "/userdata/saves/ports/rgsx/images" ] && mkdir -p /userdata/saves/ports/rgsx/images