diff --git a/clang-format-all b/clang-format-all index 645c3ce..80826bf 100755 --- a/clang-format-all +++ b/clang-format-all @@ -21,6 +21,11 @@ function usage { exit 1 } +# There is no realpath command in MacOS, so we define it here +realpath() { + [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}" +} + if [ $# -eq 0 ]; then usage fi