2
0
mirror of https://github.com/team2059/Dent synced 2024-12-18 20:52:29 -05:00
dent/autoformat.sh

9 lines
302 B
Bash
Raw Permalink Normal View History

2015-07-31 12:52:03 -04:00
#!/bin/zsh
\cd "$(dirname "$0")">/dev/null
if which colout>/dev/null; then
astyle -xc -A14 -s2 -j -xG -S -K -N -xn -xl -n **/*.{cpp,h}|\grep -P '^(?!Unchanged)'|colout '(Formatted)' green
else
astyle -xc -A14 -s2 -j -xG -S -K -N -xn -xl -n **/*.{cpp,h}|\grep -P '^(?!Unchanged)'
fi
\cd ->/dev/null