| 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 https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_i
nstructions.md | 8 # See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_i
nstructions.md |
| 9 | 9 |
| 10 usage() { | 10 usage() { |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 # This way, we can find all the packages that need to be newly installed | 417 # This way, we can find all the packages that need to be newly installed |
| 418 # without accidentally promoting any packages from "auto" to "manual". | 418 # without accidentally promoting any packages from "auto" to "manual". |
| 419 # We then re-run "apt-get" with just the list of missing packages. | 419 # We then re-run "apt-get" with just the list of missing packages. |
| 420 echo "Finding missing packages..." | 420 echo "Finding missing packages..." |
| 421 # Intentionally leaving $packages unquoted so it's more readable. | 421 # Intentionally leaving $packages unquoted so it's more readable. |
| 422 echo "Packages required: " $packages | 422 echo "Packages required: " $packages |
| 423 echo | 423 echo |
| 424 new_list_cmd="sudo apt-get install --reinstall $(echo $packages)" | 424 new_list_cmd="sudo apt-get install --reinstall $(echo $packages)" |
| 425 if new_list="$(yes n | LANGUAGE=en LANG=C $new_list_cmd)"; then | 425 if new_list="$(yes n | LANGUAGE=en LANG=C $new_list_cmd)"; then |
| 426 # We probably never hit this following line. | 426 # We probably never hit this following line. |
| 427 echo "No missing packages, and the packages are up-to-date." | 427 echo "No missing packages, and the packages are up to date." |
| 428 elif [ $? -eq 1 ]; then | 428 elif [ $? -eq 1 ]; then |
| 429 # We expect apt-get to have exit status of 1. | 429 # We expect apt-get to have exit status of 1. |
| 430 # This indicates that we cancelled the install with "yes n|". | 430 # This indicates that we cancelled the install with "yes n|". |
| 431 new_list=$(echo "$new_list" | | 431 new_list=$(echo "$new_list" | |
| 432 sed -e '1,/The following NEW packages will be installed:/d;s/^ //;t;d') | 432 sed -e '1,/The following NEW packages will be installed:/d;s/^ //;t;d') |
| 433 new_list=$(echo "$new_list" | sed 's/ *$//') | 433 new_list=$(echo "$new_list" | sed 's/ *$//') |
| 434 if [ -z "$new_list" ] ; then | 434 if [ -z "$new_list" ] ; then |
| 435 echo "No missing packages, and the packages are up-to-date." | 435 echo "No missing packages, and the packages are up to date." |
| 436 else | 436 else |
| 437 echo "Installing missing packages: $new_list." | 437 echo "Installing missing packages: $new_list." |
| 438 sudo apt-get install ${do_quietly-} ${new_list} | 438 sudo apt-get install ${do_quietly-} ${new_list} |
| 439 fi | 439 fi |
| 440 echo | 440 echo |
| 441 else | 441 else |
| 442 # An apt-get exit status of 100 indicates that a real error has occurred. | 442 # An apt-get exit status of 100 indicates that a real error has occurred. |
| 443 | 443 |
| 444 # I am intentionally leaving out the '"'s around new_list_cmd, | 444 # I am intentionally leaving out the '"'s around new_list_cmd, |
| 445 # as this makes it easier to cut and paste the output | 445 # as this makes it easier to cut and paste the output |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 # only contains libcrypto.so.1.0.0 and not the symlink needed for | 497 # only contains libcrypto.so.1.0.0 and not the symlink needed for |
| 498 # linking (libcrypto.so). | 498 # linking (libcrypto.so). |
| 499 create_library_symlink /lib/i386-linux-gnu/libcrypto.so.1.0.0 \ | 499 create_library_symlink /lib/i386-linux-gnu/libcrypto.so.1.0.0 \ |
| 500 /usr/lib/i386-linux-gnu/libcrypto.so | 500 /usr/lib/i386-linux-gnu/libcrypto.so |
| 501 | 501 |
| 502 create_library_symlink /lib/i386-linux-gnu/libssl.so.1.0.0 \ | 502 create_library_symlink /lib/i386-linux-gnu/libssl.so.1.0.0 \ |
| 503 /usr/lib/i386-linux-gnu/libssl.so | 503 /usr/lib/i386-linux-gnu/libssl.so |
| 504 else | 504 else |
| 505 echo "Skipping symbolic links for NaCl." | 505 echo "Skipping symbolic links for NaCl." |
| 506 fi | 506 fi |
| OLD | NEW |