Tools: Added check for validating input arguments in ardupilot-astyle.sh
This commit is contained in:
parent
26c2555c3c
commit
c9fb988a57
@ -1,4 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
printf "\nArguments missing, Usage: '$0 <files to style>'\n\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $(uname) = "Darwin" ]; then
|
if [ $(uname) = "Darwin" ]; then
|
||||||
DIR=$(dirname $(greadlink -f $0))
|
DIR=$(dirname $(greadlink -f $0))
|
||||||
@ -7,4 +12,3 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
astyle --options="${DIR}"/astylerc $*
|
astyle --options="${DIR}"/astylerc $*
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user