Created
August 26, 2019 04:19
-
-
Save ethiel88/7e8613387fe494202e94f735032aaa2e to your computer and use it in GitHub Desktop.
Reinicia el periodo de evaluación de productos jetbrains - Probado en las versiones 2018.*, 2019.*
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 | |
############################################################ | |
# Reinicia el periodo de evaluación de productos jetbrains # | |
# Probado en las versiones 2018.*, 2019.* # | |
# Luis Villegas ethiel88@gmail.com # | |
############################################################ | |
CYAN='\033[0;36m' | |
GREEN='\033[0;32m' | |
NC='\033[0m' # No Color | |
function proceso_reset(){ | |
echo -ne "${CYAN}* Reiniciando evaluación de ${1}... ${NC}" | |
targets=`find ~ -type d -iname ".${1}*"` | |
flag_once=true | |
for target in $targets; do | |
if [ -d $target/config/eval ]; then | |
find $target/config/eval -iname *\.evaluation\.key -exec rm -f {} 2> /dev/null \; | |
fi | |
if [ -d ~/.java/.userPrefs/jetbrains ]; then | |
find ~/.java/.userPrefs/jetbrains -iname ${1}* -exec rm -rf {} 2> /dev/null \; | |
fi | |
if [ -f $target/config/options/other.xml ]; then | |
sed -i '/evlsprt/d' $target/config/options/other.xml | |
fi | |
done | |
echo -e "${GREEN}Completado.${NC}" | |
} | |
#inicio del script | |
clear | |
for producto in phpstorm datagrip webstorm pycharm | |
do | |
proceso_reset $producto | |
done | |
echo "Script finalizado." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
La versión inicial fue probada en Linux, aunque es posible que funcione de la misma manera en MAC.