Hopefully fixed the sed and while issues

This commit is contained in:
2026-02-28 17:43:00 -06:00
parent cbda17d930
commit 03de26bd60
3 changed files with 4 additions and 4 deletions

View File

@@ -20,14 +20,14 @@ cd recalbox-savesync || {
re="'^[yY][eE]?[sS]?$'" re="'^[yY][eE]?[sS]?$'"
result="0" result="0"
while "$result" -ne 1; do while [ "$result" -ne 1 ]; do
read -rp "\nWhat's your rclone prefix? : " prefix read -rp "\nWhat's your rclone prefix? : " prefix
read -rp "Is $prefix okay? [y/N]: " ans read -rp "Is $prefix okay? [y/N]: " ans
result="$(grep -E -c "$re" "$ans")" result="$(grep -E -c "$re" "$ans")"
done done
touch /tmp/savesync touch /tmp/savesync
printf "s/<RCLONE_PREFIX>/%s/g\n" "$prefix" >/tmp/savesync printf "s|RCLONE_PREFIX|%s|\n" "$prefix" >/tmp/savesync
sed -i -e "/tmp/savesync" "savesync[rungame,endgame](sync).ash" sed -i -e "/tmp/savesync" "savesync[rungame,endgame](sync).ash"
sed -i -e "/tmp/savesync" "locksync.ash" sed -i -e "/tmp/savesync" "locksync.ash"
rm "/tmp/savesync" rm "/tmp/savesync"

View File

@@ -1,7 +1,7 @@
#!/bin/ash #!/bin/ash
#shellcheck shell=dash #shellcheck shell=dash
export REMOTE_BASE="<RCLONE_PREFIX>" export REMOTE_BASE="RCLONE_PREFIX"
export LOG_FILE="/recalbox/share/system/logs/locksync.log" export LOG_FILE="/recalbox/share/system/logs/locksync.log"
log() { log() {

View File

@@ -4,7 +4,7 @@
event_data=$(cat /tmp/es_state.inf | tr -d '\r') event_data=$(cat /tmp/es_state.inf | tr -d '\r')
export LOG_FILE="/recalbox/share/system/logs/savesync.log" export LOG_FILE="/recalbox/share/system/logs/savesync.log"
REMOTE_BASE="<RCLONE_PREFIX>" REMOTE_BASE="RCLONE_PREFIX"
#DEBUG=1 #DEBUG=1
log() { log() {