Skip to content

Commit

Permalink
install.sh: Add error message at the end.
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Stephan Kulla <[email protected]>
  • Loading branch information
kulla committed Sep 6, 2016
1 parent 1f81933 commit fc20fe8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/ipfs/dist/install.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
#!/bin/sh

bin=ipfs
binpaths="/usr/local/bin /usr/bin"

# this script is currently brain dead.
# it merely tries two locations.
# in the future maybe use value of $PATH.

for binpath in /usr/local/bin /usr/bin; do
for binpath in $binpaths; do
if [ -d "$binpath" ]; then
mv "$bin" "$binpath/$bin"
echo "installed $binpath/$bin"
exit 0
fi
done

echo "cannot install $bin in one of the directories $binpaths"
exit 1

0 comments on commit fc20fe8

Please sign in to comment.