-
-
Save zeemyself/16d0430f0ee94d6ad6e0a4678dbe2d13 to your computer and use it in GitHub Desktop.
[MacOS] Easily make incompatible JetBrains plugins "magically" compatible again!
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 -li | |
PNAME="$1" | |
PVER="$2" | |
JARNAME="${3-$PNAME}" | |
mkdir -p ./EXT01/ | |
cd ./EXT01/ || exit | |
unzip ../"${PNAME}"-"${PVER}".zip | |
rm -f ../"${PNAME}"-"${PVER}".zip | |
mv ./"${PNAME}"/lib/"${JARNAME}"-"${PVER}".jar ./"${JARNAME}"-"${PVER}".zip | |
mkdir -p ./EXT02/ | |
cd ./EXT02/ || exit | |
unzip ../"${JARNAME}"-"${PVER}".zip | |
rm -f ../"${JARNAME}"-"${PVER}".zip | |
sed -i '' 's/\ until-build=.*\/>/\/>/' ./META-INF/plugin.xml | |
zip -0 -r ../"${PNAME}"/lib/"${JARNAME}"-"${PVER}".jar ./* | |
cd ../ | |
rm -r -f ./EXT02 | |
zip -0 -r ../"${PNAME}"-"${PVER}".zip ./* | |
cd ../ | |
rm -r -f ./EXT01 |
Usage: example if downloaded plugin name github-copilot-intellij-1.5.27.7288-nightly.zip
curl -sSL https://gist.githubusercontent.com/zeemyself/16d0430f0ee94d6ad6e0a4678dbe2d13/raw/58e7c8c659dc57abce81f69e65c511621dff9638/jbppatch.sh | bash -s -- "github-copilot-intellij" "1.5.27.7288-nightly"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated script to support macOS command line