summaryrefslogtreecommitdiff
path: root/tools/ci/jobs/cpplint.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/ci/jobs/cpplint.sh')
-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,\