Improve error handling in install.sh (#404)
Prior to this change, running the example from the docs without root privs produces this misleading/confusing output that claims that the software was installed when it wasn't: ```console $ wget -qO - https://raw.githubusercontent.com/cupcakearmy/autorestic/master/install.sh | bash linux amd64 /usr/local/bin/autorestic.bz2: Permission denied bzip2: Can't open input file /usr/local/bin/autorestic.bz2: No such file or directory. chmod: cannot access '/usr/local/bin/autorestic': No such file or directory bash: line 49: autorestic: command not found Successfully installed autorestic ``` With this change, the errors stop the script much earlier and produce this output instead: ``` linux amd64 /usr/local/bin/autorestic.bz2: Permission denied ```pull/407/head
parent
41e4e4a5f3
commit
8a773856de
Loading…
Reference in new issue