install.sh: Add error message at the end.
License: MIT Signed-off-by: Stephan Kulla <git.mail@kulla.me>
Stephan Kulla committed
Sep 6, 2016 at 15:46 UTC
fc20fe870d8402e2505a7adbabb248232e38279e
1 file changed
+5
-1
cmd/ipfs/dist/install.sh
+5
-1
@@ -1,15 +1,19 @@
1
#!/bin/sh
2
3
bin=ipfs
4
+binpaths="/usr/local/bin /usr/bin"
5
6
# this script is currently brain dead.
7
# it merely tries two locations.
8
# in the future maybe use value of $PATH.
9
9
-for binpath in /usr/local/bin /usr/bin; do
10
+for binpath in $binpaths; do
11
if [ -d "$binpath" ]; then
12
mv "$bin" "$binpath/$bin"
13
echo "installed $binpath/$bin"
14
exit 0
15
fi
16
done
17
+
18
+echo "cannot install $bin in one of the directories $binpaths"
19
+exit 1