Commit Graph

11 Commits

Author SHA1 Message Date
Felix Rabe
3431c66c16 Fix occurrences of "cd dirname $0"
They are not safe for spaces in paths. There might be other places to look for trouble.

I've run the following command to produce this commit: (on OS X, copy-and-pasting the below exactly)

    find . -type f -name '*.sh' -print0  |  # Find all .sh files
        xargs -0 fgrep -H -- '`'         |  # See all places with backticks in them
        fgrep 'cd `dirname $0'           |  # I deemed these problematic (variable assignments are safe)
        cut -d ':' -f 1                  |  # Take the <file> from <file>:<line> produced by "grep -H"
        tr '\n' '\0'                     |  # Also here, spaces can be problematic - always do "xargs -0"!
        xargs -0 -- sed -i '' 's/cd `dirname $0`/cd "`dirname "$0"`"/g'

The significance of adding the two levels of "'s can be verified by running the following in your Terminal:

    $ node -e 'console.log(process.argv.splice(1))' -- `echo 1   2`
    [ '1', '2' ]

    $ node -e 'console.log(process.argv.splice(1))' -- "`echo 1   2`"
    [ '1 2' ]

    $ node -e 'console.log(process.argv.splice(1))' -- "`echo "1   2"`"
    [ '1   2' ]
2014-05-07 17:51:09 -07:00
Nick Martin
777e36650d More fixes for homedirs with spaces in their name.
Also, go on a quoting spree on places that weren't problems, so no one copies bad bash.
2013-04-15 19:46:15 -07:00
David Glasser
c7e5582537 Remove /usr/local/meteor.old after Mac upgrade to engine. 2013-03-30 17:50:30 -07:00
David Glasser
6935f63b2c pipe everything to stderr.
(stdout is lost in some contexts, eg emacs shell?)
2013-03-29 11:52:34 -07:00
David Glasser
c5d9ae151a figure out stdio stuff 2013-03-29 11:52:34 -07:00
David Glasser
513a6f2571 oops, no-* is specially handled 2013-03-29 11:52:34 -07:00
David Glasser
d8179cd255 some extra newlines 2013-03-29 11:52:34 -07:00
David Glasser
8d8bacd9a9 checkpoint for upgrade-to-engine.sh 2013-03-29 11:52:34 -07:00
David Glasser
0eff9604fc use meteor --get-ready instead of --version in places where we're trying to make
sure a checkout is complete
2013-03-29 11:52:33 -07:00
David Glasser
734c185a89 Call "uname plus arch" the "platform".
Normalize to _ (like dev bundle) rather than - (like old releases).
2013-03-29 11:52:33 -07:00
David Glasser
27923d8b24 move upgrade-to-engine stuff into a subdir.
i *think* this stuff should currently work with the new bootstrappy but have not
tested. certainly, the text is bad.
2013-03-22 23:52:54 -07:00