Forked from nonsensecreativity/jetbrains-reset-eval.sh
Created
July 22, 2021 15:04
-
-
Save bodrulamin/bd80084d312e59b14729cf437bf6b442 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