install.sh: Support tilde in prefix
Without this, the script tries to use sudo for paths owned by user.
Using eval like this is is dangerous, it will not only expand the ~ but also $(…), backquotes and probably some other characters.
This post seems to suggest a safer way (search-and-replace a leading ~ with the value of $HOME):
PREFIX="${PREFIX/#\~/$HOME}"
Using eval like this is is dangerous, it will not only expand the
~but also$(…), backquotes and probably some other characters.This post seems to suggest a safer way (search-and-replace a leading
~with the value of$HOME):PREFIX="${PREFIX/#\~/$HOME}"
Ah thanks, I'll have to update the PR. 👍
No need, I already made #26 which does just this :)
I'm busy right now but I'm making a note update this to fix the conflicts this weekend.