Created
May 19, 2020 04:48
-
-
Save nonsensecreativity/4c912346565273f61db9c0d2b8133319 to your computer and use it in GitHub Desktop.
Reset Jetbrains Evaluation
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 | |
clion() { | |
find ~/.config/JetBrains -mindepth 2 -maxdepth 2 -type d -wholename '*CLion*/eval' -exec rm -rf {} \; | |
find ~/ -mindepth 3 -maxdepth 3 -type d -wholename '*.CLion*/eval' -exec rm -rf {} \; | |
sed --quiet -i -E -e 's/.*<property.*evlsp.*//g' -e '/^$/d' ~/.config/JetBrains/CLion*/options/other.xml ~/.CLion*/config/options/other.xml 2>/dev/null | |
} | |
webstorm() { | |
find ~/.config/JetBrains -mindepth 2 -maxdepth 2 -type d -wholename '*WebStorm*/eval' -exec rm -rf {} \; | |
find ~/ -mindepth 3 -maxdepth 3 -type d -wholename '*.WebStorm*/eval' -exec rm -rf {} \; | |
sed --quiet -i -E -e 's/.*<property.*evlsp.*//g' -e '/^$/d' ~/.config/JetBrains/WebStorm*/options/other.xml ~/.WebStorm*/config/options/other.xml 2>/dev/null | |
} | |
idea() { | |
find ~/.config/JetBrains -mindepth 2 -maxdepth 2 -type d -wholename '*IntelliJIdea*/eval' -exec rm -rf {} \; | |
find ~/ -mindepth 3 -maxdepth 3 -type d -wholename '*.IntelliJIdea*/eval' -exec rm -rf {} \; | |
sed --quiet -i -E -e 's/.*<property.*evlsp.*//g' -e '/^$/d' ~/.config/JetBrains/IntelliJIdea*/options/other.xml ~/.IntelliJIdea*/config/options/other.xml 2>/dev/null | |
} | |
usage() { | |
echo "$0 <clion | idea | webstorm>" | |
} | |
if [[ "$#" != "1" ]]; then | |
usage | |
exit 1 | |
fi | |
[[ -d ~/.java/.userPrefs/jetbrains ]] && rm -rf ~/.java/.userPrefs/jetbrains | |
"$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment