If the internet connection is down, the default timeout of wget is
unreasonably long. If formatcheck is used as a pre-commit hook, this
blocks usage of git for a long time although we probably have
git-clang-format available.
Signed-off-by: Kai Krakow <kai@kaishome.de>
This adds support for a switch `--pre-commit` to work in
pre-commit-mode. It downloads the file and runs the real pre-commit-hook
then.
Signed-off-by: Kai Krakow <kai@kaishome.de>
This commit silences the standard output of wget to generate less noise
when using `format-check.sh` as a pre-commit hook.
It also doesn't redownload the file over and over again but only when
changes were detected. Previous behavior was wget creating numbered
versions by multiple downloads, thus it always used the first version
which was download. That is obviously wrong.
It errors out nicely now when the download failed.
Signed-off-by: Kai Krakow <kai@kaishome.de>
Only code formatting implemented at the moment.
Travis is currently Ubuntu 14.04, which is missing multiple library versions needed. Bootstrapping in Python 3.5, Meson and Ninja is possible, but can take a while, but also bootstrapping in libsystemd is one step too many for now as it takes a significant amount of time.