Last active
July 11, 2017 23:14
-
-
Save casssiahaluu/d854c8d2f40c589ad143128232def79b to your computer and use it in GitHub Desktop.
Script Shell para Atualização automática do Atom Editor em Ubuntu/Debian
This file contains hidden or 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 | |
cd /tmp | |
wget https://atom-installer.github.com/v1.18.0/atom-amd64.deb | |
ver=false | |
if [ -e /tmp/atom-amd64.deb ]; then | |
echo "*******Pack Baixado" | |
ver=true | |
else | |
echo "*******Erro ao baixar" | |
ver=false | |
fi | |
if [ $ver = true ]; then | |
dpkg -i atom-amd64.deb | |
rm atom-amd64.deb | |
if [ ! -e atom-amd64.deb]; then | |
echo "*******Pack apagado" | |
else | |
echo "*******Erro ao apagar" | |
fi | |
else | |
echo "Pack não baixado. Impossível continuar" | |
fi | |
echo "Operação finalizada" |
This file contains hidden or 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
cd /usr/local/bin/ | |
sudo wget https://gist.githubusercontent.com/HaluDeCassia/d854c8d2f40c589ad143128232def79b/raw/3a507a75538bab01a9d49cdf997306a220ed915a/atom_update.sh | |
sudo chmod +x atom_update.sh | |
sudo crontab -e | |
# comando para executar arquivo uma vez por semana às 17 horas | |
# m h dom mon dow command | |
# 0 17 * * 1 /usr/local/bin/atom-update.sh | ctrl+O crtl+X para salvar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment