joinmarket-clientserver icon indicating copy to clipboard operation
joinmarket-clientserver copied to clipboard

Apply all current shellcheck suggestions to install.sh

Open dmp1ce opened this issue 2 years ago • 2 comments

I noticed several shellcheck suggestions which I wrapped up into this PR. There could be issues with some of these changes. See comments.

dmp1ce avatar Feb 09 '22 14:02 dmp1ce

If we are doing this, might as well fix these things for all other shell scripts too.

$ find . -name "*.sh" | grep -v deps
./install.sh
./test/lint/lint-python.sh
./test/testrunner/install_bitcoind.sh
./test/run_tests.sh
./test/Dockerfiles/build_docker.sh
./scripts/joinmarket-qt.sh

And also add shellcheck as another linter. Could take https://github.com/bitcoin/bitcoin/blob/master/test/lint/lint-shell.sh as a base, like I did previousy wih lint-python.sh.

kristapsk avatar Feb 10 '22 17:02 kristapsk

I think shellcheck is a good idea because shell scripts have many pitfalls which are sometimes hard to spot. Shellcheck provides good suggestions for a linter IMHO.

I don't mind taking a look at automating the checks and making PRs to clean up the scripts, but I'm not sure when I'll get around to it.

dmp1ce avatar Feb 11 '22 00:02 dmp1ce

Superseded by #1414.

kristapsk avatar Dec 29 '22 07:12 kristapsk