Created
March 15, 2018 16:54
-
-
Save smarr/6803aa169879d18b4779041bac8d9e32 to your computer and use it in GitHub Desktop.
Reduce Eclipse Release for to Code Formatting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Manually remove the product setting from configuration/config.ini | |
echo Manually remove the product setting from configuration/config.ini | |
# delete sources jars and other things | |
find ../eclipse -name "*.source*.jar" -delete | |
find ../eclipse -name "*.html" -delete | |
find ../eclipse -name "*.bmp" -delete | |
rm ../eclipse/icon.xpm | |
# now try to delete the other things | |
JARS=`find ../eclipse -name "*.jar"` | |
while read -r jar; do | |
mv ${jar} ${jar}-no | |
OUTPUT=`ant eclipseformat` | |
if [[ $OUTPUT = *"ERROR"* || $OUTPUT = *"Failed"* || $OUTPUT = *"unable"* || $OUTPUT = *"MESSAGE"* ]]; then | |
echo "Could not remove ${jar}" | |
mv ${jar}-no ${jar} | |
else | |
rm ${jar}-no | |
echo "Successfully removed ${jar}" | |
echo "rm ${jar}" >> ../delete2.sh | |
fi | |
done <<< "$JARS" | |
# create a copy of the eclipse folder (running it creates temp files) | |
# execute ../delete2.sh | |
# repackage | |
# tar -zcvf eclipse.tar.gz eclipse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment