Skip to content

Instantly share code, notes, and snippets.

@comtom
Last active September 27, 2015 06:48
Show Gist options
  • Select an option

  • Save comtom/1228949 to your computer and use it in GitHub Desktop.

Select an option

Save comtom/1228949 to your computer and use it in GitHub Desktop.
Actualizar chromium al ultimo daily build
#!/bin/sh
# Autor: Tomás González Dowling
# Colaboradores: Fernando Ramirez y Facundo Guerrero
# Empresa: Comtom Tech Support
# Licencia: GPL 3
# Creamos un direcorio temporal
unzipdir=$(mktemp -d)
#cd /tmp
cd $unzipdir
# Bajamos la ultima version
wget http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux/LAST_CHANGE
mv LAST_CHANGE LATEST
ULTIMO="$(cat LATEST)"
wget http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux/$ULTIMO/chrome-linux.zip
# Descomprimimos
unzip chrome-linux.zip
# Hacemos Backup
ACTUAL="$(cat /opt/chromium/LATEST)"
mv /opt/chromium /opt/chromium-$ACTUAL
# Instalamos
mv chrome-linux /opt/chromium
cp LATEST /opt/chromium
if [ -f /usr/local/bin/chromium ]
then
echo El enlace simbolico ya existe!
else
if [ whoami != root ]
then
echo "El enlace simbolico no existe, para crearlo ejecuta como root: ln -s /opt/chromium/chrome /usr/local/bin/chromium"
else
ln -s /opt/chromium/chrome /usr/local/bin/chromium
fi
fi
# Borramos los temporales
# rm -rf /tmp/chromium-tmp
# que no hace falta, por algo son temporales ;)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment