ardupilot/Tools/CodeStyle/ardupilot-astyle.sh

15 lines
279 B
Bash
Raw Permalink Normal View History

#!/usr/bin/env bash
if [ -z "$1" ]; then
printf "\nArguments missing, Usage: '$0 <files to style>'\n\n"
exit 1
fi
2019-01-23 01:07:04 -04:00
if [ $(uname) = "Darwin" ]; then
2019-01-23 00:08:01 -04:00
DIR=$(dirname $(greadlink -f $0))
else
DIR=$(dirname $(readlink -f $0))
fi
astyle --options="${DIR}"/astylerc $*