Correctly quote result from adb, otherwise multiline responses breal (eg signal_cmd)
authorJess Robinson <castaway@desert-island.me.uk>
Sat, 11 May 2013 13:37:39 +0000 (14:37 +0100)
committerBrian Fraser <fraserbn@gmail.com>
Sun, 26 Jan 2014 17:44:19 +0000 (14:44 -0300)
hints/linux-android.sh

index f5b602f..ae8be9d 100644 (file)
@@ -70,7 +70,7 @@ foo=\`adb -s $targethost shell "sh -c '(cd \$cwd && \$env ; \$exe \$args) > $tar
 $from output.stdout
 result=\`cat output.stdout\`
 rm output.stdout
-result=\`echo \$result | sed -e 's|\r||g'\`
+result=\`echo "\$result" | sed -e 's|\r||g'\`
 foo=\`echo \$foo | sed -e 's|\r||g'\`
 # Also, adb doesn't exit with the commands exit code, like ssh does, double-grr
 echo "\$result"