GetPoplog / Seed

Scripts for getting Poplog onto your Linux machine
MIT License
8 stars 3 forks source link

Add some static analyses #106

Closed willprice closed 3 years ago

willprice commented 3 years ago

Shellcheck scripts

This will lint all *.sh outside of _build and _download and error out if they violate any of the shellcheck rules. I've updated all the scripts to pass validation (I picked out one possible bug where $POP_arch had not been set in makeStage2.sh.

Check for shebangs

We search for all .sh and .csh files and check they start with a shebang (this is simply checking for the presence of #! as the first two bytes of the file; we might want something more sophisticated to check the right shell is set.

sfkleach commented 3 years ago

Apart from the one comment, it looks good. I am slightly uneasy about diverging from FreePoplog in so many places but, on balance, I agree this is worth the chase.

willprice commented 3 years ago

I've removed the /bin/bash lines from the *.sh scripts in base and adapted the test script to only check for scripts with an exec bit set.