- Format all shell scripts using [shfmt]
(https://github.com/mvdan/sh).
Options used:
* `-bn`: binary ops like && and | may start a line
* `-sr`: redirect operators will be followed by a space
* `-ci`: indent switch cases
* `-i 4`: indent 4 spaces
* `-s`: simplify the code
* `-p`: parse for posix compliance
- Add Github action to lint changes to scripts and enforce formatting
going forward
Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
Tested it on a project with this structure:
```
- root
|- test
| - Test.java
```
The user must call `compiler` from the root of the project, but that should not
be an inconvenience because usually the working directory is the project's
root. Nonetheless, it also works for java files in the current working directory,
in case someone just wants to test some code quickly.
Adding `[ -x ]` also checks if the command is an executable; if this
check is skipped, then user-defined aliases will interfere and validate
the condition (unintended).
The `rmakrdown::` portion makes sure that no other functions mask render, and its calling it from the required rmarkdown package, and the addition of the quiet portion isnt redundant with the R -q flag, i tested script and in Vim it reduces how much text and verbose messaging comes from pandoc at the bottom to about 3 lines.