While creating [this gist](https://gist.github.com/thiagokokada/115b2588ff65a48d54b8832488801c92)
I realized that exiting if the --static flag is passed on non-Linux systems
just make more difficult to handle those cases.
Instead, let's just print a message informing the user of their mistake,
and keep running the script with the correct filename.
- Use `mktemp -d` to generate a temporary directory, only if user
doesn't use `--download-dir`
- Clean-up the temporary directory using `trap`. Remove
other `rm` calls from code since they're not necessary
anymore
- Run download in a subshell, so after finishing it the
script is still on the directory where the user ran
the script. Fix `./install --dir .` usage
- Fix backup of old Babashka install
* Add checksum to install script
This will allow someone to check if Babashka is correctly downloaded,
e.g.:
```
$ ./install --dir /tmp --checksum 3cb19f158b9f1655e0165b6c4067d35faaa05882bbdb230616c91085b02b5bf4
Downloading https://github.com/babashka/babashka/releases/download/v0.4.1/babashka-0.4.1-linux-amd64.tar.gz to /tmp
Failed checksum on babashka-0.4.1-linux-amd64.tar.gz
Got: 3cb19f158b9f1655e0165b6c4067d35faaa05882bbdb230616c91085b02b5bf3
Expected: 3cb19f158b9f1655e0165b6c4067d35faaa05882bbdb230616c91085b02b5bf4
```
There is no check by default. This makes this change backwards
compatible (e.g.: if the machine doesn't have sha256sum, this change
will not break installation).
* Add --static to install script
This will allow installation of static instead of dynamically binaries
on Linux.
* Add checksum to print_help
* Add check that --checksum and --options should be provided together