racket/collects/meta/build/unix-installer
Eli Barzilay 0814fd5fb5 Make it possible to use "~" or "~user" in the installer.
I've looked for a while, and it seems that there is no easy way to do
this, not even in bash, and worse with /bin/sh.  So this is kind of
resorting to a simple parsing of the input, and using `eval' if it
starts with a tilde.  Note the hack of not doing that when there is a
space, otherwise the `eval' thing will silently ignore it.

This hack means that it's easy to get into a mess if quotes are used
after a tilde, but that was already the case with the use of `eval' to
handle environment variables.  It's not a real security issue, however,
since we're talking about a user who can just run any command anyway.

Also including a test file for the expansion functionality.  If anyone
wants to improve this code, making the tests pass would reveal the
tricky issues.

[FWIW, I've asked on the #bash channel, and the only serious suggestion
was getting the paths as command-line arguments.  This will, however,
defeat the point of being newbie friendly...]

Closes PR 12893.
2012-07-18 22:25:41 -04:00
..
check-install-paths
installer-header Make it possible to use "~" or "~user" in the installer. 2012-07-18 22:25:41 -04:00
paths-configure-snapshot Change test to match changed configure output 2011-10-22 07:06:08 -04:00
test-expand-path-var Make it possible to use "~" or "~user" in the installer. 2012-07-18 22:25:41 -04:00
test-installer A bunch of more typos like the ones in David's commit. 2012-02-21 14:21:43 -05:00