When trying out the latest rc, i used the `./install.sh`
It hung, with no output. I removed the 2> /dev/null and
it turned out mv was waiting for user input to confirm
the change of file permssions from 555 to 755.
This PR removes piping the output from mv to /dev/null
as it seems like the safest fix.
An alternative would be to just add -f but i've err'd
on the side of caution.
If also tweaked the second condition basedo on the
recommendations of shellcheck
see: https://github.com/koalaman/shellcheck/wiki/SC2166
License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
Return to the old definition of the mv command since there is no `-t`
parameter in `mv` of BSD. Cf.
https://www.freebsd.org/cgi/man.cgi?query=mv&sektion=1
License: MIT
Signed-off-by: Stephan Kulla <git.mail@kulla.me>
I removed the comment about using $PATH since it leads to long
installation scripts (which violates the KISS principle). Cf. the
discussion on https://github.com/ipfs/go-ipfs/pull/2504
License: MIT
Signed-off-by: Stephan Kulla <git.mail@kulla.me>
Show error message that the user shall try running this script with sudo
in case write permissions are missing. Implement proposal of comment
https://github.com/ipfs/go-ipfs/pull/3194#issuecomment-245376993
License: MIT
Signed-off-by: Stephan Kulla <git.mail@kulla.me>
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>
In case $binpath/$bin is an already existing directory, the command
mv "$bin" "$binpath/$bin"
would store the binary in the place $binpath/$bin/$bin. I guess this is
not the expected behavior. Therefore I used the -t option of `mv' to
specify the target directory explicitly.
License: MIT
Signed-off-by: Stephan Kulla <git.mail@kulla.me>