diff options
author | Mike Holmes <mike.holmes@linaro.org> | 2014-02-10 21:52:10 -0500 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2014-02-12 20:40:57 +0400 |
commit | 116f55dcc8a2387f394f7f5b47354f30834b067c (patch) | |
tree | 37d51b6b3b73e56838f4744f8cd03766696a4578 /scripts/odp_check | |
parent | 78ff37a1a24b16aaad2dfb2f09db6874e9307df8 (diff) |
odp/scripts: Pre submit, file clean & check tool
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
V2 add style = linux to astyle
Diffstat (limited to 'scripts/odp_check')
-rwxr-xr-x | scripts/odp_check | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/odp_check b/scripts/odp_check new file mode 100755 index 0000000..8df35fa --- /dev/null +++ b/scripts/odp_check @@ -0,0 +1,20 @@ +#!/bin/bash +# +# This script is an indenter, white space remover, +# formatter, and beautifier and general source file +# clean up for the ODP project. +# +# Usage +# ./scripts/opd_check <path/filename> +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +if ! type "astyle" >/dev/null >/dev/null; then + echo "Please install astyle from http://astyle.sourceforge.net/" + exit -1 +fi + +astyle --style=linux --indent=force-tab=8 $1 +$DIR/cleanfile $1 +$DIR/checkpatch.pl -f $1 |