Skip to content

Instantly share code, notes, and snippets.

View cntrump's full-sized avatar
👀
Connecting...

cntrump

👀
Connecting...
View GitHub Profile
@cntrump
cntrump / cl-fmt.sh
Last active April 7, 2021 13:35 — forked from leilee/cl-fmt.sh
clang-format files recursively
#!/usr/bin/env bash
set -e
# Variable that will hold the name of the clang-format command
FMT=""
# Some distros just call it clang-format. Others (e.g. Ubuntu) are insistent
# that the version number be part of the command. We prefer clang-format if
# that's present, otherwise we work backwards from highest version to lowest