summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
Diffstat (limited to 'check')
-rwxr-xr-xcheck17
1 files changed, 12 insertions, 5 deletions
diff --git a/check b/check
index 24b73fe..bc9da92 100755
--- a/check
+++ b/check
@@ -6,28 +6,35 @@ set -euo pipefail
quiet=-q
hideok=
+offline=
+
if command -v chronic >/dev/null; then
hideok=chronic
fi
-if [ "$#" -gt 0 ]; then
+while [ "$#" -gt 0 ]; do
case "$1" in
- verbose | -v | --verbose)
+ -v | --verbose)
quiet=
hideok=
+ shift
+ ;;
+ --offline)
+ offline=--offline
+ shift
;;
esac
-fi
+done
got_cargo_cmd() {
cargo --list | grep " $1 " >/dev/null
}
# shellcheck disable=2086
-cargo build --all-targets $quiet
+cargo build $offline --all-targets $quiet
# shellcheck disable=2086
-got_cargo_cmd clippy && cargo clippy $quiet
+got_cargo_cmd clippy && cargo clippy $offline $quiet
got_cargo_cmd fmt && cargo fmt -- --check
subplot docgen summain.subplot -o summain.html