Created
October 5, 2015 23:04
-
-
Save kiarina/a1145b153e81dec0b6c1 to your computer and use it in GitHub Desktop.
format script.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cd `dirname $0` | |
if [ `uname` = "Darwin" ]; then | |
for target in `find ../Classes -name "*.cpp" -or -name "*.h"` | |
do | |
echo 'format '${target} | |
# nkf --overwrite -w8 -Lu ${target} | |
clang-format -i ${target} | |
done | |
else | |
find ../Classes/ -name "*.cpp" -or -name "*.h" | xargs -P 4 -I@ bash -c "echo 'processing '@; nkf --overwrite -w8 -Lu @; clang-format -i @;" | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment