install.sh: Check whether installation succeeds.
I moved the mv command into the if-condition so that the script only succeeds when mv command ran properly. Thus, there is no need to check whether the mv command will succeed beforehand. License: MIT Signed-off-by: Stephan Kulla <git.mail@kulla.me>
Stephan Kulla committed
Sep 7, 2016 at 13:39 UTC
f8458411c1b9bbcf82de479b5acb53a380b22ac5
1 file changed
+1
-2
cmd/ipfs/dist/install.sh
+1
-2
@@ -8,8 +8,7 @@ binpaths="/usr/local/bin /usr/bin"
8
# in the future maybe use value of $PATH.
9
10
for binpath in $binpaths; do
11
- if [ -d "$binpath" ]; then
12
- mv -t "$binpath" "$bin"
11
+ if mv -t "$binpath" "$bin" 2> /dev/null; then
12
echo "installed $binpath/$bin"
13
exit 0
14
fi