summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2023-09-09 18:02:20 +0200
committerFedja Beader <fedja@protonmail.ch>2023-09-09 18:06:54 +0200
commit4bc5f2555f48717fc969d3ba8be6e3b27dc2a829 (patch)
treeb1e42e8f8718042188110c7f4353f44a26b6d3da /tools
parent5009e37678598cdfcf705e892f4b60a282bbd10d (diff)
downloadplus-4bc5f2555f48717fc969d3ba8be6e3b27dc2a829.tar.gz
plus-4bc5f2555f48717fc969d3ba8be6e3b27dc2a829.tar.bz2
plus-4bc5f2555f48717fc969d3ba8be6e3b27dc2a829.tar.xz
plus-4bc5f2555f48717fc969d3ba8be6e3b27dc2a829.zip
Re-download cpplint only if needed or older than a day
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ci/jobs/cpplint.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/ci/jobs/cpplint.sh b/tools/ci/jobs/cpplint.sh
index b193fd4e3..496e51eb5 100755
--- a/tools/ci/jobs/cpplint.sh
+++ b/tools/ci/jobs/cpplint.sh
@@ -4,9 +4,12 @@ export LOGFILE=cpplint.log
source ./tools/ci/scripts/init.sh
-rm cpplint.py
-tools/ci/scripts/retry.sh wget "https://raw.githubusercontent.com/google/styleguide/gh-pages/cpplint/cpplint.py"
-chmod +x cpplint.py
+# Re-download if not executable or older than a day
+if [[ ! -x cpplint.py \
+ || $(find cpplint.py -mtime 1 -print) ]]; then
+ tools/ci/scripts/retry.sh wget "https://raw.githubusercontent.com/google/styleguide/gh-pages/cpplint/cpplint.py"
+ chmod +x cpplint.py
+fi
CHECKER="./cpplint.py --filter=\
-build/include,\