@cryptotaxi247 / kubo / commits / c18760060

fix: show interactive output from install.sh

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>

Oli Evans committed Feb 26, 2019 at 13:46 UTC c18760060b2a48212e71a9bafcc5d34916de1fe2
1 file changed +2 -2
cmd/ipfs/dist/install.sh
+2 -2
@@ -13,11 +13,11 @@ binpaths="/usr/local/bin /usr/bin"
13 is_write_perm_missing=""
14
15 for binpath in $binpaths; do
16 - if mv "$bin" "$binpath/$bin" 2> /dev/null; then
16 + if mv "$bin" "$binpath/$bin" ; then
17 echo "Moved $bin to $binpath"
18 exit 0
19 else
20 - if [ -d "$binpath" -a ! -w "$binpath" ]; then
20 + if [ -d "$binpath" ] && [ ! -w "$binpath" ]; then
21 is_write_perm_missing=1
22 fi
23 fi