-
-
Save JPKCom/61001ae916573b902316d9c0624d4df1 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 <shad@zaphod.eu> | |
# - by superbil <help@superbil.info> | |
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