We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bfed994 commit ff83118Copy full SHA for ff83118
1 file changed
FunKey/board/funkey/rootfs-overlay/usr/local/sbin/instant_play
@@ -60,11 +60,15 @@ save)
60
61
# Write quick load file args
62
echo -n "" > "${INSTANT_PLAY_FILE}"
63
- for arg in "$@"; do
64
-
65
- # Add quotes around all arguments
66
- echo -n "'${arg}' " >> "${INSTANT_PLAY_FILE}"
+ while :
+ do
+ printf "'" >> "${INSTANT_PLAY_FILE}"
+ printf %s "$1" | sed "s/'/'\\\\''/g" >> "${INSTANT_PLAY_FILE}"
67
+ shift
68
+ case $# in 0) break; esac
69
+ printf "' " >> "${INSTANT_PLAY_FILE}"
70
done
71
+ printf "'\n" >> "${INSTANT_PLAY_FILE}"
72
73
# Add the magic sauce to launch the process in background,
74
# record the PID into a file, wait for the process to
0 commit comments