More escaping bullshit
authorCameron Ball <cameron@cameron1729.xyz>
Mon, 8 Apr 2019 17:24:52 +0000 (01:24 +0800)
committerCameron Ball <cameron@cameron1729.xyz>
Mon, 8 Apr 2019 17:24:52 +0000 (01:24 +0800)
SongSync.sh

index e0eafd3..8146e11 100755 (executable)
@@ -111,7 +111,7 @@ if [ "$1" = "apply" ]; then
         echo "Creating dir for: ${add_path}"
         mkdir -p "${path_to_songs}/${pack_dir}"
         echo "Downloading files"
-        escaped_add_path="/mnt/media/Simfiles/"$(echo "$add_path" | sed 's/ /\\\\\\ /g' | sed "s/'/\\\\\\\\\\\'/g" | sed "s/(/\\\\\\\\\\\\(/g" | sed "s/)/\\\\\\\\\\\\\\)/g")
+        escaped_add_path="/mnt/media/Simfiles/"$(echo "$add_path" | sed 's/ /\\\\\\ /g' | sed "s/'/\\\\\\\\\\\'/g" | sed "s/(/\\\\\\\\\\\\(/g" | sed "s/)/\\\\\\\\\\\\\\)/g" | sed "s/&/\\\\\\\\\\\&/g")
         scp_command="scp -r groovenet@cameron1729.xyz:$escaped_add_path \"${path_to_songs}/${pack_dir}\""
         echo "$scp_command"
         eval "$scp_command"