Created
October 20, 2024 17:14
-
-
Save emaballarin/18852984fe087e869262295e6218e7d3 to your computer and use it in GitHub Desktop.
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
#!/usr/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment