#!/bin/bash
#
# checkstyle7 script
# JPackage Project <http://www.jpackage.org/>

# Source functions library
_prefer_jre="true"
. /usr/share/java-utils/java-functions

# Source system prefs
if [ -f /etc/java/checkstyle7.conf ] ; then
  . /etc/java/checkstyle7.conf
fi

# Source user prefs
if [ -f $HOME/.checkstyle7rc ] ; then
  . $HOME/.checkstyle7rc
fi

# Configuration
MAIN_CLASS=com.puppycrawl.tools.checkstyle.Main
BASE_FLAGS=""
BASE_OPTIONS=""
BASE_JARS="checkstyle7 antlr apache-commons-beanutils apache-commons-cli apache-commons-logging apache-commons-collections guava"

# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS

# Let's start
run "$@"
