Hopefully fixed the sed and while issues
This commit is contained in:
@@ -20,14 +20,14 @@ cd recalbox-savesync || {
|
||||
|
||||
re="'^[yY][eE]?[sS]?$'"
|
||||
result="0"
|
||||
while "$result" -ne 1; do
|
||||
while [ "$result" -ne 1 ]; do
|
||||
read -rp "\nWhat's your rclone prefix? : " prefix
|
||||
read -rp "Is $prefix okay? [y/N]: " ans
|
||||
result="$(grep -E -c "$re" "$ans")"
|
||||
done
|
||||
|
||||
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" "locksync.ash"
|
||||
rm "/tmp/savesync"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/ash
|
||||
#shellcheck shell=dash
|
||||
|
||||
export REMOTE_BASE="<RCLONE_PREFIX>"
|
||||
export REMOTE_BASE="RCLONE_PREFIX"
|
||||
export LOG_FILE="/recalbox/share/system/logs/locksync.log"
|
||||
|
||||
log() {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
event_data=$(cat /tmp/es_state.inf | tr -d '\r')
|
||||
export LOG_FILE="/recalbox/share/system/logs/savesync.log"
|
||||
REMOTE_BASE="<RCLONE_PREFIX>"
|
||||
REMOTE_BASE="RCLONE_PREFIX"
|
||||
#DEBUG=1
|
||||
|
||||
log() {
|
||||
|
||||
Reference in New Issue
Block a user