Commit Graph

9 Commits

Author SHA1 Message Date
Jacob Greenfield
590e7bb23d Fix path quoting bug introduced in #220 (#227)
It seems that some variables were mistakenly left unquoted, leading to paths containing spaces being treated incorrectly.

For example, the directory `/home/person/foo bar/test/` would cause `CURDIR=$(pwd)` to be expanded to `CURDIR=/home/person/foo bar/test/`. This means that the shell would attempt to run the command `bar/test/` with the environment variable `CURDIR` set to `/home/person/foo`. This is due to [word splitting](https://www.gnu.org/software/bash/manual/html_node/Word-Splitting.html). (TL;DR the result of shell expansions should probably be quoted 99% of the time)
2019-03-06 08:35:35 -08:00
Nic Hartley
a77638d5c1 Remove bashism in favor of portable alternative (#220) 2019-02-21 17:02:22 +02:00
Jukka Jylänki
3b6c6b8652 Make emsdk work on Windows with MSYS shell and native Windows Python 2.7 2017-08-15 20:23:36 +03:00
Fumiya Chiba
3bf41eba42 Use $0 to get execution path
$_ is "The last argument of the previous command." (cf. man zshparam) on
zsh, so SRC will be "]".
2015-04-15 20:48:20 +09:00
Jukka Jylänki
4f52f0e181 Add a comment to emsdk_env.sh to remind that it's supposed to be sourced. 2014-12-30 18:55:49 +02:00
Aidan Hobson Sayers
2fc268b364 Improve cross-shell compatibility 2014-11-18 00:42:02 +00:00
Aidan Hobson Sayers
90da8d5dc3 $_ seems to be unreliable if used as first command of shell 2014-11-15 21:08:18 +00:00
Warren Seine
1b51a1e617 Allow running emsdk_env.sh from another directory.
Move into the emsdk directory before running ./emsdk. Make it possible to add `test -x $EMSCRIPTEN/emsdk_env.sh && source $EMSCRIPTEN/emsdk_env.sh` to my shell initialization script.
2014-09-02 12:01:35 +02:00
Jukka Jylänki
34d478034f Migrate OSX shell activation to work the same way as on Windows: source ./emsdk_env.sh instead of emsdk_add_path. 2014-07-03 18:50:00 +03:00