Install script succesful even though it fails
SimonWoidig opened this issue · comments
Šimon Woidig commented
Describe the bug
When installing autorestic using the script, it fails "silently" if bzip2
is missing.
Expected behavior
The script should check if bzip2
(and maybe other dependencies) are installed and it should fail before trying to download and install autorestic and restic. It definitely should not fail with exit code 0.
Environment
- OS: Centos
- Version: 7
Additional context
Command line output:
]# wget -qO - https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh | bash
linux
amd64
--2022-10-18 15:39:49-- https://github.com/cupcakearmy/autorestic/releases/download/v1.7.4/autorestic_1.7.4_linux_amd64.bz2
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/192879094/ef42a901-1e3e-43c2-a158-f855e5a83c28?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20221018%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221018T133955Z&X-Amz-Expires=300&X-Amz-Signature=6d6195772a4642d8562a94a909f1581ee61a851690f66b9b5e1a761ff0b80828&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=192879094&response-content-disposition=attachment%3B%20filename%3Dautorestic_1.7.4_linux_amd64.bz2&response-content-type=application%2Foctet-stream [following]
--2022-10-18 15:39:55-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/192879094/ef42a901-1e3e-43c2-a158-f855e5a83c28?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20221018%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221018T133955Z&X-Amz-Expires=300&X-Amz-Signature=6d6195772a4642d8562a94a909f1581ee61a851690f66b9b5e1a761ff0b80828&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=192879094&response-content-disposition=attachment%3B%20filename%3Dautorestic_1.7.4_linux_amd64.bz2&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.110.133, 185.199.109.133, 185.199.111.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6456638 (6.2M) [application/octet-stream]
Saving to: ‘/usr/local/bin/autorestic.bz2’
100%[==============================================================================================================================================================================================================================>] 6,456,638 21.8MB/s in 0.3s
2022-10-18 15:39:56 (21.8 MB/s) - ‘/usr/local/bin/autorestic.bz2’ saved [6456638/6456638]
FINISHED --2022-10-18 15:39:56--
Total wall clock time: 7.4s
Downloaded: 1 files, 6.2M in 0.3s (21.8 MB/s)
bash: line 39: bzip2: command not found
chmod: cannot access ‘/usr/local/bin/autorestic’: No such file or directory
bash: line 42: autorestic: command not found
Successfully installed autorestic
Nicco commented
Thanks for reporting and fixing! ❤️