summaryrefslogtreecommitdiff
path: root/standalone/osx/git-annex.app
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-05-26 15:38:44 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-05-26 15:38:54 -0400
commit00e1331e6ae475d876437860f44734c34ce027a1 (patch)
tree767fe11f75fb8efa1c91cfdf3fc127c298fdfc47 /standalone/osx/git-annex.app
parentfc191616517215c173a0b3bb8102311ca91e9766 (diff)
Linux standalone, OSX app: Improve runshell script to always quote shell vars, so that it will work when eg, untarred into a directory path with spaces in its name.
Diffstat (limited to 'standalone/osx/git-annex.app')
-rwxr-xr-xstandalone/osx/git-annex.app/Contents/MacOS/runshell10
1 files changed, 5 insertions, 5 deletions
diff --git a/standalone/osx/git-annex.app/Contents/MacOS/runshell b/standalone/osx/git-annex.app/Contents/MacOS/runshell
index 534e9707e..0af0a0c6f 100755
--- a/standalone/osx/git-annex.app/Contents/MacOS/runshell
+++ b/standalone/osx/git-annex.app/Contents/MacOS/runshell
@@ -38,9 +38,9 @@ if [ ! -e "$HOME/.ssh/git-annex-shell" ]; then
echo "#!/bin/sh"
echo "set -e"
echo "if [ \"x\$SSH_ORIGINAL_COMMAND\" != \"x\" ]; then"
- echo "exec $base/runshell git-annex-shell -c \"\$SSH_ORIGINAL_COMMAND\""
+ echo "exec '$base/runshell' git-annex-shell -c \"\$SSH_ORIGINAL_COMMAND\""
echo "else"
- echo "exec $base/runshell git-annex-shell -c \"\$@\""
+ echo "exec '$base/runshell' git-annex-shell -c \"\$@\""
echo "fi"
) > "$HOME/.ssh/git-annex-shell"
chmod +x "$HOME/.ssh/git-annex-shell"
@@ -53,7 +53,7 @@ if [ ! -e "$HOME/.ssh/git-annex-wrapper" ]; then
(
echo "#!/bin/sh"
echo "set -e"
- echo "exec $base/runshell \"\$@\""
+ echo "exec '$base/runshell' \"\$@\""
) > "$HOME/.ssh/git-annex-wrapper"
chmod +x "$HOME/.ssh/git-annex-wrapper"
fi
@@ -62,12 +62,12 @@ fi
# system binaries.
ORIG_PATH="$PATH"
export ORIG_PATH
-PATH=$bundle:$PATH
+PATH="$bundle:$PATH"
export PATH
ORIG_GIT_EXEC_PATH="$GIT_EXEC_PATH"
export ORIG_GIT_EXEC_PATH
-GIT_EXEC_PATH=$bundle
+GIT_EXEC_PATH="$bundle"
export GIT_EXEC_PATH
ORIG_GIT_TEMPLATE_DIR="$GIT_TEMPLATE_DIR"