mirror of
https://github.com/Alex313031/thorium.git
synced 2025-01-11 04:12:39 -03:00
70 lines
2 KiB
Bash
70 lines
2 KiB
Bash
#!/bin/sh
|
|
#
|
|
# Copyright (c) 2022 The Chromium Authors and Alex313031. All rights reserved.
|
|
# 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=150
|
|
;;
|
|
* )
|
|
PRIORITY=150
|
|
;;
|
|
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 ##
|
|
if [ ! -e "$DEFAULTS_FILE" ]; then
|
|
echo 'repo_add_once="true"' > "$DEFAULTS_FILE"
|
|
echo 'repo_reenable_on_distupgrade="true"' >> "$DEFAULTS_FILE"
|
|
fi
|
|
|
|
# Run the cron job immediately to perform repository configuration.
|
|
nohup sh /etc/cron.daily/@@PACKAGE@@ > /dev/null 2>&1 &
|