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"
cd /recalbox/share/system
curl -L -o savesync.tar.gz "$ENDPOINT"
tar -xvf savesync.tar.gz
rm savesync.tar.gz
cd recalbox-savesync
cp *.ash /recalbox/share/userscripts/
mkdir -p /recalbox/share/system/configs/savesync
cp *.conf /recalbox/share/system/configs/savesync/
mount -o remount,rw / >/dev/null
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
cd ..
rm -rf recalbox-savesync

View File

@@ -10,14 +10,14 @@ LOG_FILE="/recalbox/share/system/logs/savesync.log"
chmod 666 "$PIPE"
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 ---"
while true; do
# Read one line from the pipe
if read -r line < "$PIPE"; then
if read -r line <"$PIPE"; then
case "$line" in
LOG:*)
write_log "${line#LOG:}"