1#!/bin/sh 2# 3# Copyright (c) 2009 The Chromium Authors. All rights reserved. 4# Use of this source code is governed by a BSD-style license that can be 5# found in the LICENSE file. 6 7set -e 8 9@@include@@../common/postinst.include 10 11# Add to the alternatives system 12# 13# On Ubuntu 12.04, we have the following priorities 14# (which can be obtain be installing browsers and running 15# update-alternatives --query x-www-browser): 16# 17# /usr/bin/epiphany-browser 85 18# /usr/bin/firefox 40 19# /usr/bin/konqueror 30 20# 21# While we would expect these values to be keyed off the most popular 22# browser (Firefox), in practice, we treat Epiphany as the lower bound, 23# resulting in the following scheme: 24 25CHANNEL=@@CHANNEL@@ 26case $CHANNEL in 27 stable ) 28 # Good enough to be the default. 29 PRIORITY=200 30 ;; 31 beta ) 32 # Almost good enough to be the default. (Firefox stable should arguably be 33 # higher than this, but since that's below the "Epiphany threshold", we're 34 # not setting our priority below it. Anyone want to poke Firefox to raise 35 # their priority?) 36 PRIORITY=150 37 ;; 38 unstable ) 39 # Unstable, give it the "lowest" priority. 40 PRIORITY=120 41 ;; 42 * ) 43 PRIORITY=0 44 ;; 45esac 46 47update-alternatives --install /usr/bin/x-www-browser x-www-browser \ 48 /usr/bin/@@USR_BIN_SYMLINK_NAME@@ $PRIORITY 49update-alternatives --install /usr/bin/gnome-www-browser gnome-www-browser \ 50 /usr/bin/@@USR_BIN_SYMLINK_NAME@@ $PRIORITY 51 52update-alternatives --install /usr/bin/google-chrome google-chrome \ 53 /usr/bin/@@USR_BIN_SYMLINK_NAME@@ $PRIORITY 54 55@@include@@../common/apt.include 56 57@@include@@../common/symlinks.include 58 59remove_udev_symlinks 60add_udev_symlinks 61 62## MAIN ## 63if [ ! -e "$DEFAULTS_FILE" ]; then 64 echo 'repo_add_once="true"' > "$DEFAULTS_FILE" 65 echo 'repo_reenable_on_distupgrade="true"' >> "$DEFAULTS_FILE" 66fi 67 68# Run the cron job immediately to perform repository configuration. 69nohup sh /etc/cron.daily/@@PACKAGE@@ > /dev/null 2>&1 & 70