Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 @@include@@variables.include | 1 @@include@@variables.include |
| 2 | 2 |
| 3 APT_GET="`which apt-get 2> /dev/null`" | 3 APT_GET="`which apt-get 2> /dev/null`" |
| 4 APT_CONFIG="`which apt-config 2> /dev/null`" | 4 APT_CONFIG="`which apt-config 2> /dev/null`" |
| 5 | 5 |
| 6 SOURCES_PREAMBLE="### THIS FILE IS AUTOMATICALLY CONFIGURED ### | 6 SOURCES_PREAMBLE="### THIS FILE IS AUTOMATICALLY CONFIGURED ### |
| 7 # You may comment out this entry, but any other modifications may be lost.\n" | 7 # You may comment out this entry, but any other modifications may be lost.\n" |
| 8 | 8 |
| 9 # Parse apt configuration and return requested variable value. | 9 # Parse apt configuration and return requested variable value. |
| 10 apt_config_val() { | 10 apt_config_val() { |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 134 m5o2ggoONj3qI3JaRHsZaOs1qPQcyd46OyIFUpHJIfk4nezDCoQYd93bWUGqDwxI | 134 m5o2ggoONj3qI3JaRHsZaOs1qPQcyd46OyIFUpHJIfk4nezDCoQYd93bWUGqDwxI |
| 135 /n/CsdO0365yqDO/ADscehlVqdAupVv2 | 135 /n/CsdO0365yqDO/ADscehlVqdAupVv2 |
| 136 =dmoF | 136 =dmoF |
| 137 -----END PGP PUBLIC KEY BLOCK----- | 137 -----END PGP PUBLIC KEY BLOCK----- |
| 138 KEYDATA | 138 KEYDATA |
| 139 fi | 139 fi |
| 140 } | 140 } |
| 141 | 141 |
| 142 # Set variables for the locations of the apt sources lists. | 142 # Set variables for the locations of the apt sources lists. |
| 143 find_apt_sources() { | 143 find_apt_sources() { |
| 144 # NB: These variables only *sometimes* include a trailing slash. (In | |
| 145 # particular, in Ubuntu 16.10 / Debian 9, the default value *stopped* | |
| 146 # including the trailing slash.) We have to join them with slashes, even | |
| 147 # though that sometimes gives a double slash. | |
|
Lei Zhang
2016/11/08 23:44:35
Does "${APTDIR%/}/" make it consistently 1 slash?
| |
| 144 APTDIR=$(apt_config_val Dir) | 148 APTDIR=$(apt_config_val Dir) |
| 145 APTETC=$(apt_config_val 'Dir::Etc') | 149 APTETC=$(apt_config_val 'Dir::Etc') |
| 146 APT_SOURCES="$APTDIR$APTETC$(apt_config_val 'Dir::Etc::sourcelist')" | 150 APT_SOURCES="$APTDIR/$APTETC/$(apt_config_val 'Dir::Etc::sourcelist')" |
| 147 APT_SOURCESDIR="$APTDIR$APTETC$(apt_config_val 'Dir::Etc::sourceparts')" | 151 APT_SOURCESDIR="$APTDIR/$APTETC/$(apt_config_val 'Dir::Etc::sourceparts')" |
| 148 } | 152 } |
| 149 | 153 |
| 150 # Update the Google repository if it's not set correctly. | 154 # Update the Google repository if it's not set correctly. |
| 151 # Note: this doesn't necessarily enable the repository, it just makes sure the | 155 # Note: this doesn't necessarily enable the repository, it just makes sure the |
| 152 # correct settings are available in the sources list. | 156 # correct settings are available in the sources list. |
| 153 # Returns: | 157 # Returns: |
| 154 # 0 - no update necessary | 158 # 0 - no update necessary |
| 155 # 2 - error | 159 # 2 - error |
| 156 update_bad_sources() { | 160 update_bad_sources() { |
| 157 if [ ! "$REPOCONFIG" ]; then | 161 if [ ! "$REPOCONFIG" ]; then |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 275 get_lib_dir() { | 279 get_lib_dir() { |
| 276 if [ "$DEFAULT_ARCH" = "i386" ]; then | 280 if [ "$DEFAULT_ARCH" = "i386" ]; then |
| 277 LIBDIR=lib/i386-linux-gnu | 281 LIBDIR=lib/i386-linux-gnu |
| 278 elif [ "$DEFAULT_ARCH" = "amd64" ]; then | 282 elif [ "$DEFAULT_ARCH" = "amd64" ]; then |
| 279 LIBDIR=lib/x86_64-linux-gnu | 283 LIBDIR=lib/x86_64-linux-gnu |
| 280 else | 284 else |
| 281 echo Unknown CPU Architecture: "$DEFAULT_ARCH" | 285 echo Unknown CPU Architecture: "$DEFAULT_ARCH" |
| 282 exit 1 | 286 exit 1 |
| 283 fi | 287 fi |
| 284 } | 288 } |
| OLD | NEW |