123456789101112131415161718 |
- #!/usr/bin/env bash
- TMPDIR=`mktemp -d`
- HERE=`dirname "$0"`
- if uncrustify -l CPP -c "$HERE/../share/uncrustify/uncrustify.cfg" -f "$1" >$TMPDIR/uncrustify.out ; then
- cp "$TMPDIR/uncrustify.out" "$1" ;
- else
- echo "Something went wrong with uncrustify."
- fi
- [[ -f "$TMPDIR/uncrustify.out" ]] && rm "$TMPDIR/uncrustify.out"
- rmdir "$TMPDIR"
|