From 116f55dcc8a2387f394f7f5b47354f30834b067c Mon Sep 17 00:00:00 2001 From: Mike Holmes Date: Mon, 10 Feb 2014 21:52:10 -0500 Subject: odp/scripts: Pre submit, file clean & check tool Signed-off-by: Mike Holmes V2 add style = linux to astyle --- scripts/odp_check | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 scripts/odp_check (limited to 'scripts/odp_check') 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 +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 -- cgit v1.2.3