Skip to content

Instantly share code, notes, and snippets.

@nickboldt
Created November 29, 2012 04:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickboldt/4166784 to your computer and use it in GitHub Desktop.
Save nickboldt/4166784 to your computer and use it in GitHub Desktop.
JBDS-2394 patch process
#!/bin/bash
# set path where you have JBDS 5 installed
JBDS5=${HOME}/jbdevstudio/studio
# fix plugin
cd ${JBDS5}/plugins/
cp org.jboss.ide.eclipse.as.core_2.3.1.v20120715-0243-H142-Final.jar org.jboss.ide.eclipse.as.core_2.3.1.v20120715-0243-H142-Final_patched_JBDS-2394.jar
unzip org.jboss.ide.eclipse.as.core_2.3.1.v20120715-0243-H142-Final_patched_JBDS-2394.jar -d org.jboss.ide.eclipse.as.core_2.3.1.v20120715-0243-H142-Final_patched_JBDS-2394
cd ${JBDS5}/plugins/org.jboss.ide.eclipse.as.core_2.3.1.v20120715-0243-H142-Final_patched_JBDS-2394
# note this will change 5 lines in the file, not 4
sed -i -e "s#4.8,4.9,4.10#4.8,4.9,4.10,4.11#g" -e "s#4.7,4.9,4.10#4.7,4.9,4.10,4.11#g" plugin.xml
zip -u ${JBDS5}/plugins/org.jboss.ide.eclipse.as.core_2.3.1.v20120715-0243-H142-Final_patched_JBDS-2394.jar plugin.xml
cd ${JBDS5}/plugins/
rm -fr ${JBDS5}/plugins/org.jboss.ide.eclipse.as.core_2.3.1.v20120715-0243-H142-Final_patched_JBDS-2394
# fix feature
cd ${JBDS5}/features/
cp -r ${JBDS5}/features/org.jboss.ide.eclipse.as.serverAdapter.wtp.feature_2.3.1.v20120715-0243-H142-Final ${JBDS5}/features/org.jboss.ide.eclipse.as.serverAdapter.wtp.feature_2.3.1.v20120715-0243-H142-Final_patched_JBDS-2394
cd ${JBDS5}/features/org.jboss.ide.eclipse.as.serverAdapter.wtp.feature_2.3.1.v20120715-0243-H142-Final_patched_JBDS-2394
sed -i -e 's#<plugin id="org.jboss.ide.eclipse.as.core" download-size="1042" install-size="2049" version="2.3.1.v20120715-0243-H142-Final" unpack="false" />#<plugin id="org.jboss.ide.eclipse.as.core" version="2.3.1.v20120715-0243-H142-Final_patched_JBDS-2394" unpack="false" />#g' feature.xml
sed -i -e 's#<feature id="org.jboss.ide.eclipse.as.serverAdapter.wtp.feature" label="%featureName" version="2.3.1.v20120715-0243-H142-Final">#<feature id="org.jboss.ide.eclipse.as.serverAdapter.wtp.feature" label="%featureName" version="2.3.1.v20120715-0243-H142-Final_patched_JBDS-2394">#g' feature.xml
# restart jbds5
cd ${JBDS5}
./jbdevstudio -clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment