1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-31 21:05:37 +02:00

[releng] Make it easier to run cleanup scripts out of tree

This commit is contained in:
Jonah Graham 2023-02-15 19:28:54 -05:00
parent 78f437da94
commit cb367f063e
2 changed files with 8 additions and 4 deletions

View file

@ -16,6 +16,8 @@ set -e
# This script is reused by other projects, if so, COREPROJECT should be set # This script is reused by other projects, if so, COREPROJECT should be set
# to the project to use a basis for project settings # to the project to use a basis for project settings
## ##
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
CDTDIR=${DIR}/../..
: ${COREPROJECT:=core/org.eclipse.cdt.core} : ${COREPROJECT:=core/org.eclipse.cdt.core}
## ##
@ -37,6 +39,6 @@ if test -e check_code_cleanliness_workspace; then
fi fi
${ECLIPSE} \ ${ECLIPSE} \
-consolelog -nosplash -application org.eclipse.jdt.core.JavaCodeFormatter \ -consolelog -nosplash -application org.eclipse.jdt.core.JavaCodeFormatter \
-config $PWD/$COREPROJECT/.settings/org.eclipse.jdt.core.prefs \ -config $CDTDIR/$COREPROJECT/.settings/org.eclipse.jdt.core.prefs \
$PWD -data check_code_cleanliness_workspace $PWD -data check_code_cleanliness_workspace
rm -rf check_code_cleanliness_workspace rm -rf check_code_cleanliness_workspace

View file

@ -17,6 +17,8 @@ set -e
# This script is reused by other projects, if so, COREPROJECT should be set # This script is reused by other projects, if so, COREPROJECT should be set
# to the project to use a basis for project settings # to the project to use a basis for project settings
## ##
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
CDTDIR=${DIR}/../..
: ${COREPROJECT:=core/org.eclipse.cdt.core} : ${COREPROJECT:=core/org.eclipse.cdt.core}
## ##
@ -47,7 +49,7 @@ git ls-files -- \*\*/.project ":!$COREPROJECT/.project" | while read i ; do
# JDT # JDT
if [[ $natures == *"org.eclipse.jdt.core.javanature"* ]]; then if [[ $natures == *"org.eclipse.jdt.core.javanature"* ]]; then
cp $COREPROJECT/.settings/org.eclipse.jdt.* $d/.settings cp $CDTDIR/$COREPROJECT/.settings/org.eclipse.jdt.* $d/.settings
# For test plug-ins we are more lenient so don't warn on some items # For test plug-ins we are more lenient so don't warn on some items
if echo $i | grep -E '\.tests?[/\.]' > /dev/null; then if echo $i | grep -E '\.tests?[/\.]' > /dev/null; then
sed -i \ sed -i \
@ -78,8 +80,8 @@ git ls-files -- \*\*/.project ":!$COREPROJECT/.project" | while read i ; do
# PDE # PDE
if [[ $natures == *"org.eclipse.pde.PluginNature"* ]]; then if [[ $natures == *"org.eclipse.pde.PluginNature"* ]]; then
cp $COREPROJECT/.settings/org.eclipse.pde.prefs $d/.settings cp $CDTDIR/$COREPROJECT/.settings/org.eclipse.pde.prefs $d/.settings
cp $COREPROJECT/.settings/org.eclipse.pde.api.tools.prefs $d/.settings cp $CDTDIR/$COREPROJECT/.settings/org.eclipse.pde.api.tools.prefs $d/.settings
if echo $i | grep -E '\.tests?[/\.]' > /dev/null; then if echo $i | grep -E '\.tests?[/\.]' > /dev/null; then
sed -i \ sed -i \
'-es@compilers.p.not-externalized-att=1@compilers.p.not-externalized-att=2@' \ '-es@compilers.p.not-externalized-att=1@compilers.p.not-externalized-att=2@' \