aboutsummaryrefslogtreecommitdiff
path: root/scripts/odp_check
blob: 09c859be6d0448387e89f990998cda1057ff8078 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 --align-pointer=name $1
$DIR/cleanfile $1
$DIR/checkpatch.pl -f $1