OLD | NEW |
1 #!/bin/bash -e | 1 #!/bin/bash -e |
2 | 2 |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 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 # Script to install everything needed to build chromium (well, ideally, anyway) | 7 # Script to install everything needed to build chromium (well, ideally, anyway) |
8 # See http://code.google.com/p/chromium/wiki/LinuxBuildInstructions | 8 # See http://code.google.com/p/chromium/wiki/LinuxBuildInstructions |
9 # and http://code.google.com/p/chromium/wiki/LinuxBuild64Bit | 9 # and http://code.google.com/p/chromium/wiki/LinuxBuild64Bit |
10 | 10 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 libxrandr2-dbg libxrender1-dbg libxtst6-dbg zlib1g-dbg" | 113 libxrandr2-dbg libxrender1-dbg libxtst6-dbg zlib1g-dbg" |
114 | 114 |
115 # arm cross toolchain packages needed to build chrome on arm | 115 # arm cross toolchain packages needed to build chrome on arm |
116 arm_list="libc6-armel-cross libc6-dev-armel-cross libgcc1-armel-cross | 116 arm_list="libc6-armel-cross libc6-dev-armel-cross libgcc1-armel-cross |
117 libgomp1-armel-cross linux-libc-dev-armel-cross | 117 libgomp1-armel-cross linux-libc-dev-armel-cross |
118 libgcc1-dbg-armel-cross libgomp1-dbg-armel-cross | 118 libgcc1-dbg-armel-cross libgomp1-dbg-armel-cross |
119 binutils-arm-linux-gnueabi cpp-arm-linux-gnueabi | 119 binutils-arm-linux-gnueabi cpp-arm-linux-gnueabi |
120 gcc-arm-linux-gnueabi g++-arm-linux-gnueabi | 120 gcc-arm-linux-gnueabi g++-arm-linux-gnueabi |
121 libmudflap0-dbg-armel-cross" | 121 libmudflap0-dbg-armel-cross" |
122 | 122 |
123 # Plugin lists needed for tests. | |
124 plugin_list="flashplugin-installer" | |
125 | 123 |
126 # Some package names have changed over time | 124 # Some package names have changed over time |
127 if apt-cache show ttf-mscorefonts-installer >/dev/null 2>&1; then | 125 if apt-cache show ttf-mscorefonts-installer >/dev/null 2>&1; then |
128 dev_list="${dev_list} ttf-mscorefonts-installer" | 126 dev_list="${dev_list} ttf-mscorefonts-installer" |
129 else | 127 else |
130 dev_list="${dev_list} msttcorefonts" | 128 dev_list="${dev_list} msttcorefonts" |
131 fi | 129 fi |
132 if apt-cache show libnspr4-dbg >/dev/null 2>&1; then | 130 if apt-cache show libnspr4-dbg >/dev/null 2>&1; then |
133 dbg_list="${dbg_list} libnspr4-dbg libnss3-dbg" | 131 dbg_list="${dbg_list} libnspr4-dbg libnss3-dbg" |
134 lib_list="${lib_list} libnspr4 libnss3" | 132 lib_list="${lib_list} libnspr4 libnss3" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 arm_list= | 232 arm_list= |
235 fi | 233 fi |
236 | 234 |
237 sudo apt-get update | 235 sudo apt-get update |
238 | 236 |
239 # We initially run "apt-get" with the --reinstall option and parse its output. | 237 # We initially run "apt-get" with the --reinstall option and parse its output. |
240 # This way, we can find all the packages that need to be newly installed | 238 # This way, we can find all the packages that need to be newly installed |
241 # without accidentally promoting any packages from "auto" to "manual". | 239 # without accidentally promoting any packages from "auto" to "manual". |
242 # We then re-run "apt-get" with just the list of missing packages. | 240 # We then re-run "apt-get" with just the list of missing packages. |
243 echo "Finding missing packages..." | 241 echo "Finding missing packages..." |
244 packages="${dev_list} ${lib_list} ${dbg_list} ${plugin_list} ${arm_list}" | 242 packages="${dev_list} ${lib_list} ${dbg_list} ${arm_list}" |
245 # Intentionally leaving $packages unquoted so it's more readable. | 243 # Intentionally leaving $packages unquoted so it's more readable. |
246 echo "Packages required: " $packages | 244 echo "Packages required: " $packages |
247 echo | 245 echo |
248 new_list_cmd="sudo apt-get install --reinstall $(echo $packages)" | 246 new_list_cmd="sudo apt-get install --reinstall $(echo $packages)" |
249 if new_list="$(yes n | LANG=C $new_list_cmd)"; then | 247 if new_list="$(yes n | LANG=C $new_list_cmd)"; then |
250 # We probably never hit this following line. | 248 # We probably never hit this following line. |
251 echo "No missing packages, and the packages are up-to-date." | 249 echo "No missing packages, and the packages are up-to-date." |
252 elif [ $? -eq 1 ]; then | 250 elif [ $? -eq 1 ]; then |
253 # We expect apt-get to have exit status of 1. | 251 # We expect apt-get to have exit status of 1. |
254 # This indicates that we cancelled the install with "yes n|". | 252 # This indicates that we cancelled the install with "yes n|". |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 sed -e 's/[.]so[.][0-9].*/.so/' | | 461 sed -e 's/[.]so[.][0-9].*/.so/' | |
464 sort -u); do | 462 sort -u); do |
465 [ "x${i##*/}" = "xld-linux.so" ] && continue | 463 [ "x${i##*/}" = "xld-linux.so" ] && continue |
466 [ -r "$i" ] && continue | 464 [ -r "$i" ] && continue |
467 j="$(ls "$i."* | sed -e 's/.*[.]so[.]\([^.]*\)$/\1/;t;d' | | 465 j="$(ls "$i."* | sed -e 's/.*[.]so[.]\([^.]*\)$/\1/;t;d' | |
468 sort -n | tail -n 1)" | 466 sort -n | tail -n 1)" |
469 [ -r "$i.$j" ] || continue | 467 [ -r "$i.$j" ] || continue |
470 sudo ln -s "${i##*/}.$j" "$i" | 468 sudo ln -s "${i##*/}.$j" "$i" |
471 done | 469 done |
472 fi | 470 fi |
OLD | NEW |