Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow install.sh to be run without being the script dir #4547

Merged
merged 3 commits into from
Jan 6, 2018

Conversation

epheph
Copy link
Contributor

@epheph epheph commented Jan 4, 2018

This is a very simple change, but took me a few minutes to resolve, since the documentation is specifically broken related to this.

https://ipfs.io/docs/install/#installing-from-a-prebuilt-package

...
After downloading, untar the archive, and move the ipfs binary somewhere in your executables $PATH using the install.sh script:

tar xvfz go-ipfs.tar.gz

./go-ipfs/install.sh # <-- install.sh cannot currently be run when not inside the go-ipfs directory

Test it out:
...

License: MIT
Signed-off-by: Scott Bigelow <epheph@gmail.com>
Copy link
Member

@magik6k magik6k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching that, one comment, then LGTM.

@@ -3,7 +3,9 @@
# Installation script for ipfs. It tries to move $bin in one of the
# directories stored in $binpaths.

bin=ipfs
INSTALL_DIR=`dirname $0`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use $(..) syntax instead of backticks.

License: MIT
Signed-off-by: Scott Bigelow <epheph@gmail.com>
bin=ipfs
INSTALL_DIR=$(dirname $0)

bin=$INSTALL_DIR/ipfs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, one more comment. Put the value here in quotes:

bin="$INSTALL_DIR/ipfs"

Otherwise any spaces in the INSTALL_DIR path will break this

License: MIT
Signed-off-by: Scott Bigelow <epheph@gmail.com>
@epheph
Copy link
Contributor Author

epheph commented Jan 5, 2018

Sure thing, definitely correct to quote.

2 line change, 2 bugs 😎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants