fix formatting
scripts/shellcheck: add wrapper thing to send given script to server
add license
This is a "wrapper" for shellcheck. It runs a web server, receives a shell script via HTTP POST, runs shellcheck on it, and returns the output from shellcheck.
Example:
$ cat test.sh
#!/bin/sh
echo "hello world"
[ -z $test ] && exit 0
$ curl -F"script=@test.sh" http://localhost:8000/upload
In /tmp/shellcheck-web958582229 line 5:
[ -z $test ] && exit 0
^---^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
[ -z "$test" ] && exit 0
For more information:
https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
There's also an extremely simple HTTP form that can be used in a browser to send a script for checking.
Because I want to write shell scripts on a platform (aarch64) that shellcheck doesn't work on, because there are issues building the haskell compiler for other architectures.