Created
April 22, 2017 04:06
-
-
Save drhr/2cfae5e2b922e58111ad9c39c8608eeb to your computer and use it in GitHub Desktop.
set IntelliJ CLion "Single instance only" mode on all named build targets
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
import sys, xml.etree.ElementTree as ET | |
with open('.idea/workspace.xml', 'r') as f: | |
data = f.read() | |
tree = ET.fromstring(data) | |
configurations = tree.findall('.//configuration[@default="false"][@TARGET_NAME]') | |
for c in configurations: | |
c.attrib['singleton'] = "true" | |
with open('.idea/workspace.xml', 'w') as f: | |
f.write(ET.tostring(tree)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment