puzzleos / stubby

UEFI bootloader stub
GNU Lesser General Public License v2.1
12 stars 8 forks source link

Some cleanups to stubby-smash script. #1

Closed smoser closed 3 years ago

smoser commented 3 years ago

There are a few cleanups here that I wanted when trying to use stubby smash:

a. There is no real reason for 'bash', so change to be posix compliant and use /bin/sh shebang. Using bash isn't wrong, but there is no need for or benefit from it here. b. use 4 spaces for indentation. There was a mix of tab in some places (functions) and 8 spaces in the "main". c. use 'command -v' rather than 'which'. command -v is a shell builtin versus 'which' which is an external program. d. give a better error message on bad input. Instead of simply showing usage of non-existant file as input, show an error message identifying which argument was the problem. e. use one argument "--long-option=value" as opposed to two ("--long-option" "value") when invoking objcopy. The former is more obvious to the reader.

pcmoore commented 3 years ago

Hi @smoser,

Thanks for the patch, but three things in no particular order:

... other than those things everything looks fine to me.

smoser commented 3 years ago

Hi @smoser,

Thanks for the patch, but three things in no particular order:

* I know you're not a big fan of sign-offs, but please sign your work as described in [CONTRIBUTING.md](https://github.com/puzzleos/stubby/blob/main/CONTRIBUTING.md).

done. now you know it came from me. :wink:

* Please stick with tabs for indentation; if there is a mix of spaces and tabs, feel free to convert to tabs.

done

* Please keep a line of vertical whitespace after the "# main" comment block.

done

... other than those things everything looks fine to me.

pcmoore commented 3 years ago

Merged via 1f1838acb6b5d0f3be733b13388cf3b9cee32acf - thanks!