| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 # | 2 # |
| 3 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 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 | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 set -e | 7 set -e |
| 8 | 8 |
| 9 @@include@@../common/variables.include |
| 10 |
| 9 @@include@@../common/postinst.include | 11 @@include@@../common/postinst.include |
| 10 | 12 |
| 13 @@include@@../common/apt.include |
| 14 |
| 15 @@include@@../common/symlinks.include |
| 16 |
| 11 # Add to the alternatives system | 17 # Add to the alternatives system |
| 12 # | 18 # |
| 13 # On Ubuntu 12.04, we have the following priorities | 19 # On Ubuntu 12.04, we have the following priorities |
| 14 # (which can be obtain be installing browsers and running | 20 # (which can be obtain be installing browsers and running |
| 15 # update-alternatives --query x-www-browser): | 21 # update-alternatives --query x-www-browser): |
| 16 # | 22 # |
| 17 # /usr/bin/epiphany-browser 85 | 23 # /usr/bin/epiphany-browser 85 |
| 18 # /usr/bin/firefox 40 | 24 # /usr/bin/firefox 40 |
| 19 # /usr/bin/konqueror 30 | 25 # /usr/bin/konqueror 30 |
| 20 # | 26 # |
| (...skipping 16 matching lines...) Expand all Loading... |
| 37 ;; | 43 ;; |
| 38 unstable ) | 44 unstable ) |
| 39 # Unstable, give it the "lowest" priority. | 45 # Unstable, give it the "lowest" priority. |
| 40 PRIORITY=120 | 46 PRIORITY=120 |
| 41 ;; | 47 ;; |
| 42 * ) | 48 * ) |
| 43 PRIORITY=0 | 49 PRIORITY=0 |
| 44 ;; | 50 ;; |
| 45 esac | 51 esac |
| 46 | 52 |
| 53 remove_chrome_symlinks |
| 54 add_chrome_symlinks |
| 55 |
| 56 remove_udev_symlinks |
| 57 |
| 47 update-alternatives --install /usr/bin/x-www-browser x-www-browser \ | 58 update-alternatives --install /usr/bin/x-www-browser x-www-browser \ |
| 48 /usr/bin/@@USR_BIN_SYMLINK_NAME@@ $PRIORITY | 59 /usr/bin/@@USR_BIN_SYMLINK_NAME@@ $PRIORITY |
| 49 update-alternatives --install /usr/bin/gnome-www-browser gnome-www-browser \ | 60 update-alternatives --install /usr/bin/gnome-www-browser gnome-www-browser \ |
| 50 /usr/bin/@@USR_BIN_SYMLINK_NAME@@ $PRIORITY | 61 /usr/bin/@@USR_BIN_SYMLINK_NAME@@ $PRIORITY |
| 51 | 62 |
| 52 update-alternatives --install /usr/bin/google-chrome google-chrome \ | 63 update-alternatives --install /usr/bin/google-chrome google-chrome \ |
| 53 /usr/bin/@@USR_BIN_SYMLINK_NAME@@ $PRIORITY | 64 /usr/bin/@@USR_BIN_SYMLINK_NAME@@ $PRIORITY |
| 54 | 65 |
| 55 @@include@@../common/apt.include | |
| 56 | |
| 57 @@include@@../common/symlinks.include | |
| 58 | |
| 59 remove_udev_symlinks | |
| 60 | |
| 61 ## MAIN ## | 66 ## MAIN ## |
| 62 if [ ! -e "$DEFAULTS_FILE" ]; then | 67 if [ ! -e "$DEFAULTS_FILE" ]; then |
| 63 echo 'repo_add_once="true"' > "$DEFAULTS_FILE" | 68 echo 'repo_add_once="true"' > "$DEFAULTS_FILE" |
| 64 echo 'repo_reenable_on_distupgrade="true"' >> "$DEFAULTS_FILE" | 69 echo 'repo_reenable_on_distupgrade="true"' >> "$DEFAULTS_FILE" |
| 65 fi | 70 fi |
| 66 | 71 |
| 67 # Run the cron job immediately to perform repository configuration. | 72 # Run the cron job immediately to perform repository configuration. |
| 68 nohup sh /etc/cron.daily/@@PACKAGE@@ > /dev/null 2>&1 & | 73 nohup sh /etc/cron.daily/@@PACKAGE@@ > /dev/null 2>&1 & |
| OLD | NEW |