2015-08-22 16:04:51 -04:00
|
|
|
#!/bin/bash
|
2015-08-22 17:39:12 -04:00
|
|
|
|
|
|
|
|
ASTYLE_VER=`astyle --version`
|
|
|
|
|
ASTYLE_VER_REQUIRED="Artistic Style Version 2.05.1"
|
|
|
|
|
|
|
|
|
|
if [ "$ASTYLE_VER" != "$ASTYLE_VER_REQUIRED" ]; then
|
|
|
|
|
echo "Error: you're using ${ASTYLE_VER}, but PX4 requires ${ASTYLE_VER_REQUIRED}"
|
|
|
|
|
echo "You can get the correct version here: https://github.com/PX4/astyle/releases/tag/2.05.1"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
2016-04-17 16:17:07 -04:00
|
|
|
if [[ $# -eq 0 ]] ; then
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
|
2015-08-18 11:40:01 +02:00
|
|
|
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
2012-08-04 15:12:36 -07:00
|
|
|
astyle \
|
2015-08-18 11:40:01 +02:00
|
|
|
--options=$DIR/astylerc \
|
2015-01-05 23:16:30 -05:00
|
|
|
--preserve-date \
|
2012-08-04 15:12:36 -07:00
|
|
|
$*
|