Created
June 8, 2022 13:25
-
-
Save mping-exo/13205c3184455a8f198f62656d66ba44 to your computer and use it in GitHub Desktop.
fix idea classpath
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 | |
xml='<content url="file://$MODULE_DIR$"> | |
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> | |
<sourceFolder url="file://$MODULE_DIR$/dev" isTestSource="false" /> | |
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" /> | |
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" /> | |
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" /> | |
<excludeFolder url="file://$MODULE_DIR$/checkouts" /> | |
<excludeFolder url="file://$MODULE_DIR$/target" /> | |
</content>' | |
# doesnt work | |
# find modules -name 'sos-proxy.iml' | xargs perl -0777 -p -e 's/<content.*\/content>/$xml/igs' | less | |
find modules -name '*.iml' | xargs perl -0777 -pi -e 's/<content.*\/content>/<content url="file:\/\/\$MODULE_DIR\$"><sourceFolder url="file:\/\/\$MODULE_DIR\$\/src" isTestSource="false" \/><sourceFolder url="file:\/\/\$MODULE_DIR\$\/java" isTestSource="false" \/><sourceFolder url="file:\/\/\$MODULE_DIR\$\/test" isTestSource="true" \/><sourceFolder url="file:\/\/\$MODULE_DIR\$\/resources" type="java-resource" \/><excludeFolder url="file:\/\/\$MODULE_DIR\$\/checkouts" \/><excludeFolder url="file:\/\/\$MODULE_DIR\$\/target" \/><\/content>/igs' | |
# TODO | |
# - sos-metastore also depends on sos-protobuf: | |
# - <orderEntry type="module" module-name="sos-protobuf" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment