blob: 43f2b1138d3fa598abd6a8c3244e66364b52f819 [file] [edit]
#!/bin/sh
#
# Copyright 2009 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e
@@include@@../common/variables.include
@@include@@../common/postinst.include
# Add to the alternatives system
#
# On Ubuntu 12.04, we have the following priorities
# (which can be obtain be installing browsers and running
# update-alternatives --query x-www-browser):
#
# /usr/bin/epiphany-browser 85
# /usr/bin/firefox 40
# /usr/bin/konqueror 30
#
# While we would expect these values to be keyed off the most popular
# browser (Firefox), in practice, we treat Epiphany as the lower bound,
# resulting in the following scheme:
CHANNEL=@@channel
case $CHANNEL in
stable )
# Good enough to be the default.
PRIORITY=200
;;
beta )
# Almost good enough to be the default. (Firefox stable should arguably be
# higher than this, but since that's below the "Epiphany threshold", we're
# not setting our priority below it. Anyone want to poke Firefox to raise
# their priority?)
PRIORITY=150
;;
unstable )
# Unstable, give it the "lowest" priority.
PRIORITY=120
;;
* )
PRIORITY=0
;;
esac
update-alternatives --install /usr/bin/x-www-browser x-www-browser \
/usr/bin/@@usr_bin_symlink_name $PRIORITY
update-alternatives --install /usr/bin/gnome-www-browser gnome-www-browser \
/usr/bin/@@usr_bin_symlink_name $PRIORITY
update-alternatives --install /usr/bin/@@package_orig @@package_orig \
/usr/bin/@@usr_bin_symlink_name $PRIORITY
@@include@@../common/apt.include
@@include@@../common/symlinks.include
remove_udev_symlinks
## MAIN ##
install_key
install_deb822_sources
remove_legacy_list
remove_legacy_key