blob: 1b98e8c5acd3eae6e3e905c3b0041dbc5350d653 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#! /bin/bash
ASTYLEOPTS="-v \
--indent=spaces=4 \
--brackets=attach \
--pad-paren-in \
--indent-classes \
--indent-preprocessor \
--align-pointer=type \
--suffix=none \
--formatted
"
if [ $# -eq 0 ]; then
echo "need at least one argument" && exit 1
fi
CMD=$(which astyle)
if [ "X${CMD}" != "X" ]; then
echo $CMD $ASTYLEOPTS $@
$CMD $ASTYLEOPTS $@
fi
|