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
Executable File

#!/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