Created
December 2, 2021 10:11
-
-
Save mping-exo/df47bd1df89032f4764bf0189cce6cba to your computer and use it in GitHub Desktop.
fix-idea.sh
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$/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