Roll src/third_party/skia 99c7c07:4af6580
[chromium-blink-merge.git] / chrome / installer / linux / common / repo.cron
blobfbb3e744abc6fa22ffb4d6d72aa3518263ef6cdc
1 #!/bin/sh
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.
7 # This script is part of the @@PACKAGE@@ package.
9 # It creates the repository configuration file for package updates, and it
10 # monitors that config to see if it has been disabled by the overly aggressive
11 # distro upgrade process (e.g. intrepid -> jaunty). When this situation is
12 # detected, the respository will be re-enabled. If the respository is disabled
13 # for any other reason, this won't re-enable it.
15 # This functionality can be controlled by creating the $DEFAULTS_FILE and
16 # setting "repo_add_once" and/or "repo_reenable_on_distupgrade" to "true" or
17 # "false" as desired. An empty $DEFAULTS_FILE is the same as setting both values
18 # to "false".
20 @@include@@apt.include
22 ## MAIN ##
23 DEFAULTS_FILE="/etc/default/@@PACKAGE@@"
24 if [ -r "$DEFAULTS_FILE" ]; then
25 . "$DEFAULTS_FILE"
28 if [ "$repo_add_once" = "true" ]; then
29 install_key
30 create_sources_lists
31 RES=$?
32 # Sources creation succeeded, so stop trying.
33 if [ $RES -ne 2 ]; then
34 sed -i -e 's/[[:space:]]*repo_add_once=.*/repo_add_once="false"/' "$DEFAULTS_FILE"
36 else
37 update_bad_sources
40 if [ "$repo_reenable_on_distupgrade" = "true" ]; then
41 handle_distro_upgrade