scrot
scrot copied to clipboard
rewrite autogen.sh to handle its args strictly
As it currently stands in the master branch, the autogen.sh script is very liberal with its arguments.
For instance, If you run ./autogen.sh clean trailing garbage, it ignores the arguments $2 and $3 (trailing and garbage). A more important issue is that if $1 is anything but clean, it runs autoreconf -i. One can imagine someone accidentally running autoreconf -i because clean was mistyped.
I rewrote the script to be strict, its argument list is exactly either empty or the string clean, otherwise it returns error. Additionally, the new script makes use of printf rather than echo. POSIX seems to recommend strongly against echo, as the RATIONALE sections of printf and echo explain.
I'm claiming sole authorship because I rewrote it and putting it under the same license as the rest of the project, but I'd like to know whether @eribertomota agrees/disagrees with this before asking for it to be merged, so I'm leaving the PR a draft for now.
Whoops, I accidentally deleted the branch.