Files
OpenVR-AdvancedSettings-frame/build_scripts/linux/format
T
Vasily 4446af2a06 Add linux script
Not a lot of output compared to windows. It is assumed that linux users
have clang-format in the path.
2018-12-28 00:24:40 +01:00

17 lines
481 B
Bash

#!/usr/bin/env bash
clang-format --version
if [ $? -eq 0 ]; then
echo "Clang-format found."
build_path="`dirname \"$0\"`"
project_path=$build_path/../..
find $project_path/src/ -regex '.*\.\(cpp\|h\)' -exec clang-format -style=file -i {} \; -exec echo "Iteration 1: {}" \;
find $project_path/src/ -regex '.*\.\(cpp\|h\)' -exec clang-format -style=file -i {} \; -exec echo "Iteration 2: {}" \;
echo "DONE"
else
echo "Could not find clang-format."
fi