At the very least, you should consider running the code through cd bin ; shellcheck --shell=bash *.sh ... a quick count fount 225 issues, including lots of variables being used without double quotes to prevent white-space issues.
shfmt is also nice and will fix a bunch of errors, but it'll ruin your nice formatting in a few places.
At the very least, you should consider running the code through
cd bin ; shellcheck --shell=bash *.sh
... a quick count fount 225 issues, including lots of variables being used without double quotes to prevent white-space issues.shfmt
is also nice and will fix a bunch of errors, but it'll ruin your nice formatting in a few places.