hyphanet / java_installer

The java-based installer
https://freenetproject.org/
26 stars 19 forks source link

BUGFIX: Linux update script now works when called from outside of freene... #4

Closed bmurray7 closed 10 years ago

bmurray7 commented 11 years ago

BUGFIX: Linux update script now works when called from outside of freenet install directory. Previously, the update files would be written in the directory the script was called from.

nextgens commented 11 years ago

This is the wrong way to do it imho. try:

installation_dir=`dirname $0` ; cd "$installation_dir"
infinity0 commented 11 years ago

also there is never a reason to do grab the output of pwd, cd always sets $PWD by POSIX standard.

Thynix commented 11 years ago

To handle spaces in the path to the script the argument to dirname must be quoted. In my testing backquotes act as quotes in that they prevent breaking by whitespace and need not be in quotes themselves.

installation_dir=`dirname "$0"`; cd "$installation_dir"
Thynix commented 10 years ago

I've added cd66a3b6e7fa9c65a55393084331ec6ffd01470a to fix this. Thanks for your pull request, and I'm sorry it took so long.