mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
26 lines
358 B
Bash
Executable File
26 lines
358 B
Bash
Executable File
#!/bin/bash
|
|
echo pwd:$PWD
|
|
astyle=$1
|
|
format=$2
|
|
format_wildcards="""
|
|
./matrix/*.*pp
|
|
./test/*.*pp
|
|
"""
|
|
|
|
echo astyle: $astyle
|
|
echo format: $format
|
|
|
|
if [[ $format ]]
|
|
then
|
|
echo formatting
|
|
$astyle ${format_wildcards}
|
|
else
|
|
echo checking format
|
|
$astyle --dry-run ${format_wildcards} | grep Formatted
|
|
if [[ $? -eq 0 ]]
|
|
then
|
|
echo need to format
|
|
exit 1
|
|
fi
|
|
fi
|