Skip to content

Instantly share code, notes, and snippets.

@shurajcodx
Last active September 25, 2024 14:57
Show Gist options
  • Save shurajcodx/941ba2adc6e5183d0da7761e819b9cf3 to your computer and use it in GitHub Desktop.
Save shurajcodx/941ba2adc6e5183d0da7761e819b9cf3 to your computer and use it in GitHub Desktop.
reset jetbrains Intellij IDE , WebStorm, PHPStorm - Work 2019.x.x and above vesion evaluation [Linux]
success=false
if [ "$(date +'%d')" = "12" ]; then
# Intellij
ijKeyPath=$HOME/.IntelliJIdea*/config/eval/*.key
ijConfigPath=$HOME/.IntelliJIdea*/config/options/other.xml
if test -f "$ijKeyPath"; then
echo "Resetting Intellij"
rm $ijKeyPath
rm $ijConfigPath
$success=true
fi
# PHPStorm
psKeyPath=$HOME/.PhpStorm*/config/eval/*.key
psConfigPath=$HOME/.PhpStorm*/config/options/other.xml
if test -f "$psKeyPath"; then
echo "Resetting PHPStorm"
rm $phpStormPath
rm $psConfigPath
$success=true
fi
# WebStorm
wsKeyPath=$HOME/.WebStorm*/config/eval/*.key
wsConfigPath=$HOME/.WebStorm*/config/options/other.xml
if test -f "$wsKeyPath"; then
echo "Resetting Webstorm"
rm $wsKeyPath
rm $wsConfigPath
$success=true
fi
if $success; then
rm -rf $HOME/.java/.userPrefs/jetbrains/
rm $HOME/.java/.userPrefs/prefs.xml
echo "Done!"
else
echo "Reset done with errors"
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment