Fixed up the script a bit, and the installer to remove cruff

This commit is contained in:
2026-02-27 22:27:28 -06:00
parent 73e04e0bf5
commit b9ea45eafb
2 changed files with 59 additions and 62 deletions

View File

@@ -3,15 +3,12 @@
ENDPOINT="https://git.sassysalamander.net/wytch/recalbox-savesync/archive/main.tar.gz" ENDPOINT="https://git.sassysalamander.net/wytch/recalbox-savesync/archive/main.tar.gz"
cd /recalbox/share/system cd /recalbox/share/system
curl -L -o savesync.tar.gz "$ENDPOINT" curl -L -o savesync.tar.gz "$ENDPOINT"
tar -xvf savesync.tar.gz tar -xvf savesync.tar.gz
rm savesync.tar.gz rm savesync.tar.gz
cd recalbox-savesync cd recalbox-savesync
cp *.ash /recalbox/share/userscripts/ cp *.ash /recalbox/share/userscripts/
mkdir -p /recalbox/share/system/configs/savesync mkdir -p /recalbox/share/system/configs/savesync
cp *.conf /recalbox/share/system/configs/savesync/ cp *.conf /recalbox/share/system/configs/savesync/
cd ..
mount -o remount,rw / >/dev/null rm -rf recalbox-savesync
curl -L -o /usr/bin/nc https://github.com/therealsaumil/static-arm-bins/raw/refs/heads/master/nc-arm-static
chmod 755 /usr/bin/nc
mount -o remount >/dev/null

View File

@@ -10,14 +10,14 @@ LOG_FILE="/recalbox/share/system/logs/savesync.log"
chmod 666 "$PIPE" chmod 666 "$PIPE"
write_log() { write_log() {
printf "[%s] %s\n" "$(date '+%Y-%m-%d %H:%M:%S')" "$1" >> "$LOG_FILE" printf "[%s] %s\n" "$(date '+%Y-%m-%d %H:%M:%S')" "$1" >>"$LOG_FILE"
} }
write_log "--- Daemon Started ---" write_log "--- Daemon Started ---"
while true; do while true; do
# Read one line from the pipe # Read one line from the pipe
if read -r line < "$PIPE"; then if read -r line <"$PIPE"; then
case "$line" in case "$line" in
LOG:*) LOG:*)
write_log "${line#LOG:}" write_log "${line#LOG:}"