Skip to content
This repository
tree: cec5c208d5
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 41 lines (31 sloc) 0.891 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
#!/bin/bash
#postinst script for chromeos

set -x

. /usr/share/debconf/confmodule

case "$1" in
  configure|reconfigure)
    rm -rf /opt/chromeos
    LKGR=$(curl http://chromium-status.appspot.com/lkgr)
    URL="http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_ChromiumOS/${LKGR}/chrome-linux.zip"
    ZIPFILE="/tmp/chromeos-linux.zip"

    zip -T $ZIPFILE
    # ABORTS IF ZIP FILES ARE NO GOOD.
    if [ $? != "0" ] ; then
rm $ZIPFILE
    fi

curl -z $ZIPFILE -o $ZIPFILE -L "$URL"
    unzip $ZIPFILE -d "/opt/"
    mv /opt/chrome-linux /opt/chromeos
    chmod 775 /opt/chromeos -R
    chown root:root /usr/sbin/chromeos
    chown root:root /usr/share/xsessions/chromeos.desktop
  ;;

  abort-upgrade|abort-remove|abort-deconfigure)
    
  ;;

  *)
       echo "postinst called with unknown argument \`$1'" >&2
       exit 1
  ;;
esac

#DEBHELPER#

exit 0
Something went wrong with that request. Please try again.