Skip to content

Instantly share code, notes, and snippets.

@zhaostu
Last active August 26, 2022 12:37
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 zhaostu/7443711 to your computer and use it in GitHub Desktop.
Save zhaostu/7443711 to your computer and use it in GitHub Desktop.

Usage

wget -qO- http://goo.gl/xkyeeW | bash

#!/bin/bash
#based on https://wiki.archlinux.org/index.php/Chromium
deb2tar() {
sed -e '1,/data\.tar/d' $1 > $2
}
if [ `uname -m` == 'x86_64' ]; then
# 64-bit
export CHROME="https://dl.google.com/linux/direct/google-chrome-unstable_current_amd64.deb"
export TALK="https://dl.google.com/linux/direct/google-talkplugin_current_amd64.deb"
export JAVA="http://javadl.sun.com/webapps/download/AutoDL?BundleId=65687"
else
# 32-bit
export CHROME="https://dl-ssl.google.com/linux/direct/google-chrome-unstable_current_i386.deb"
export TALK="https://dl.google.com/linux/direct/google-talkplugin_current_i386.deb"
export JAVA="http://javadl.sun.com/webapps/download/AutoDL?BundleId=65685"
fi
#clean stuff
mount -o remount, rw /
cd /opt/
mkdir -p /usr/lib/mozilla/plugins/
#Flash, pdf
echo "Downloading Google Chrome"
curl -z "/opt/chrome-bin.deb" -o "/opt/chrome-bin.deb" -L $CHROME
deb2tar /opt/chrome-bin.deb /opt/chrome.tar.lzma
rm /opt/chrome-bin.deb
rm -rf chrome-unstable
mkdir chrome-unstable
tar -xvf /opt/chrome.tar.lzma -C chrome-unstable
rm /opt/chrome.tar.lzma
#mp3,mp4
cp /opt/chrome-unstable/opt/google/chrome/libffmpegsumo.so /usr/lib/cromo/ -f
cp /opt/chrome-unstable/opt/google/chrome/libffmpegsumo.so /opt/google/chrome/ -f
cp /opt/chrome-unstable/opt/google/chrome/libffmpegsumo.so /usr/lib/mozilla/plugins/ -f
#pdf
cp /opt/chrome-unstable/opt/google/chrome/libpdf.so /opt/google/chrome/ -f
#flash
cp /opt/chrome-unstable/opt/google/chrome/PepperFlash/libpepflashplayer.so /opt/google/chrome/pepper/ -f
cp /opt/chrome-unstable/opt/google/chrome/PepperFlash/manifest.json /opt/google/chrome/pepper/ -f
cat > "/opt/google/chrome/pepper/pepper-flash.info" << EOF
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Registration file for Pepper Flash player.
FILE_NAME=/opt/google/chrome/pepper/libpepflashplayer.so
PLUGIN_NAME="Shockwave Flash"
VERSION="11.8.800.96"
VISIBLE_VERSION="11.8 r800"
DESCRIPTION="$PLUGIN_NAME $VISIBLE_VERSION"
MIME_TYPES="application/x-shockwave-flash"
EOF
rm -rf chrome-unstable
## Google Talk
echo "Downloading Google Talk plugin"
curl -z "/opt/talk-bin.deb" -o "/opt/talk-bin.deb" -L $TALK
deb2tar /opt/talk-bin.deb /opt/talk.tar.gz
rm /opt/talk-bin.deb
rm -rf /opt/google/talkplugin
tar -xvf /opt/talk.tar.gz -C /
rm /opt/google/chrome/pepper/libnpgoogletalk.so
ln -s /opt/google/talkplugin/libnpgoogletalk.so /opt/google/chrome/pepper/libnpgoogletalk.so
rm /opt/google/chrome/pepper/libnpgtpo3dautoplugin.so
ln -s /opt/google/talkplugin/libnpgtpo3dautoplugin.so /opt/google/chrome/pepper/libnpgtpo3dautoplugin.so
rm /opt/talk.tar.gz
env-update
restart ui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment