1
0
espelhamento de https://github.com/vaadin/framework.git sincronizado 2024-07-26 07:14:46 +02:00
vaadin-framework/scripts/format.sh
Artur Signell 7ca1b0d1a8 Script for formatting the project using Eclipse
Change-Id: I9c4f210e29d14db29ea75b172f9b017f91b8bc7c
2014-12-30 10:28:10 +00:00

29 linhas
667 B
Bash
Arquivo executável

#!/bin/bash
# Find eclipse binary
if [ "$ECLIPSE" = "" ]
then
ECLIPSE=`which eclipse`
fi
if [ "$ECLIPSE" = "" ]
then
echo "Could not find 'eclipse' in PATH"
echo "Either add it to the PATH or set the ECLIPSE variable to point to the Eclipse binary"
echo "e.g. ECLIPSE=\"/some/where/eclipse\" $0"
exit 1
fi
# Resolve project root directory
basedir=`dirname $0`/..
pushd "$basedir" > /dev/null
basedir=`pwd`
popd > /dev/null
SRC=`ls -d $basedir/*/src $basedir/*/tests/src`
# Use project formatting settings
config="$basedir/.settings/org.eclipse.jdt.core.prefs"
"$ECLIPSE" -nosplash -application org.eclipse.jdt.core.JavaCodeFormatter -config "$config" $SRC