Created
September 16, 2010 16:22
-
-
Save Superbil/582700 to your computer and use it in GitHub Desktop.
auto update chromium on osx
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 | |
# Chromium update script | |
# - by shad <[email protected]> | |
# - by superbil <[email protected]> | |
OS=mac | |
SITE=http://build.chromium.org/buildbot/snapshots/chromium-rel- | |
LATEST=$(wget -q -O - ${SITE}${OS}/LATEST) | |
INSTALL_DIR=/Applications | |
TARGET=Chromium | |
TMP_ZIP=chrome.zip | |
TMP_DIR="/tmp/update-chrome-$RANDOM" | |
( | |
mkdir $TMP_DIR; cd $TMP_DIR | |
echo Download ${TARGET}... | |
wget -O ${TMP_DIR}/${TMP_ZIP} ${SITE}${OS}/${LATEST}/chrome-${OS}.zip | |
if [ $? -ne 0 ] ; then | |
echo Cannot update. | |
exit 1 | |
fi | |
echo Unzip ${TARGET}... | |
unzip -qq ${TMP_ZIP} | |
echo Closing ${TARGET}... | |
killall ${TARGET} | |
echo Copying ${TARGET}... | |
rm -rf "${INSTALL_DIR}/${TARGET}.app" | |
mv chrome-$OS/${TARGET}.app "$INSTALL_DIR" | |
) | |
# Clean TempFiles | |
rm -rf ${TMP_DIR} |
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
00 12 * * * /Users/Shared/mbin/chromium_update.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment