Skip to content

Instantly share code, notes, and snippets.

@nonsensecreativity
Created May 19, 2020 04:48
Show Gist options
  • Save nonsensecreativity/4c912346565273f61db9c0d2b8133319 to your computer and use it in GitHub Desktop.
Save nonsensecreativity/4c912346565273f61db9c0d2b8133319 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