Allow install.sh to be run without being the script dir
License: MIT Signed-off-by: Scott Bigelow <epheph@gmail.com>
Scott Bigelow committed
Jan 4, 2018 at 14:41 UTC
a2eb40c4233501f5748d61bc9983d2f265345791
1 file changed
+3
-1
cmd/ipfs/dist/install.sh
+3
-1
@@ -3,7 +3,9 @@
3
# Installation script for ipfs. It tries to move $bin in one of the
4
# directories stored in $binpaths.
5
6
-bin=ipfs
6
+INSTALL_DIR=`dirname $0`
7
+
8
+bin=$INSTALL_DIR/ipfs
9
binpaths="/usr/local/bin /usr/bin"
10
11
# This variable contains a nonzero length string in case the script fails