Skip to content

Instantly share code, notes, and snippets.

@ethiel88
Created August 26, 2019 04:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ethiel88/7e8613387fe494202e94f735032aaa2e to your computer and use it in GitHub Desktop.
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.*
#!/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."
@ethiel88
Copy link
Author

La versión inicial fue probada en Linux, aunque es posible que funcione de la misma manera en MAC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment