[pacman-dev] [PATCH] scripts/*.sh.in: Clean up and fix a few bugs