Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nguyentienlong/9935b761f071285051466880d5071d2f to your computer and use it in GitHub Desktop.
Save nguyentienlong/9935b761f071285051466880d5071d2f to your computer and use it in GitHub Desktop.
Reset Jetbrains Evaluation
#!/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