/srv/osrm/osrm-backend/scripts
NameSizeModeActions
ci/-0755rm
analyze.sh7910755editdlrm
bisect_cucumber.sh7810755editdlrm
build_api_docs.sh15810755editdlrm
check_taginfo.py15180755editdlrm
error_on_dirty.sh2430755editdlrm
format.sh9890755editdlrm
gdb_printers.py192960644editdlrm
md5sum.js22460755editdlrm
modernize.sh5350755editdlrm
node_install.sh4030755editdlrm
osm2cucumber.js15680644editdlrm
osrm-runner.js65310755editdlrm
poly2req.js33160755editdlrm
tidy.sh5230755editdlrm
timer.js4840755editdlrm
update_dependencies.sh14910755editdlrm
validate_changelog.js14870644editdlrm
Edit: /srv/osrm/osrm-backend/scripts/format.sh (989B)
#!/usr/bin/env bash set -o errexit set -o pipefail set -o nounset # Runs the Clang Formatter in parallel on the code base. # Return codes: # - 1 there are files to be formatted # - 0 everything looks fine # Get CPU count OS=$(uname) NPROC=1 if [[ $OS = "Linux" ]] ; then NPROC=$(nproc) elif [[ ${OS} = "Darwin" ]] ; then NPROC=$(sysctl -n hw.physicalcpu) fi # Discover clang-format if type clang-format-10 2> /dev/null ; then CLANG_FORMAT=clang-format-10 elif type clang-format 2> /dev/null ; then # Clang format found, but need to check version CLANG_FORMAT=clang-format V=$(clang-format --version) if [[ $V != *10.0* ]] ; then echo "clang-format is not 10.0 (returned ${V})" #exit 1 fi else echo "No appropriate clang-format found (expected clang-format-10, or clang-format)" exit 1 fi find src include unit_tests example -type f -name '*.hpp' -o -name '*.cpp' \ | xargs -I{} -P ${NPROC} ${CLANG_FORMAT} -i -style=file {}