Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # Copyright 2014 The Chromium Authors. All rights reserved. | 3 # Copyright 2014 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 # Reproduces the content of 'components' and 'components-chromium' using the | 7 # Reproduces the content of 'components' and 'components-chromium' using the |
| 8 # list of dependencies from 'bower.json'. Downloads needed packages and makes | 8 # list of dependencies from 'bower.json'. Downloads needed packages and makes |
| 9 # Chromium specific modifications. To launch the script you need 'bower' and | 9 # Chromium specific modifications. To launch the script you need 'bower' and |
| 10 # 'crisper' installed on your system. | 10 # 'crisper' installed on your system. |
| 11 | 11 |
| 12 check_dep() { | |
| 13 eval "$1" >/dev/null 2>&1 | |
|
michaelpg
2016/02/17 05:14:29
why: eval "$1"
why not: which "$2"
Dan Beam
2016/02/17 17:22:31
https://codereview.chromium.org/1702553002/diff/16
| |
| 14 if [ $? -ne 0 ]; then | |
| 15 echo >&2 "This script requires $2." | |
| 16 echo >&2 "Have you tried $3?" | |
| 17 exit 1 | |
| 18 fi | |
| 19 } | |
| 20 | |
| 21 check_dep "which npm" "npm" "visiting https://nodejs.org/en/" | |
| 22 check_dep "which bower" "bower" "npm install -g bower" | |
| 23 check_dep "which crisper" "crisper" "npm install -g crisper" | |
| 24 check_dep "which rsync" "rsync" "apt-get install rsync" | |
| 25 | |
| 12 set -e | 26 set -e |
| 13 | 27 |
| 14 cd "$(dirname "$0")" | 28 cd "$(dirname "$0")" |
| 15 | 29 |
| 16 rm -rf components | 30 rm -rf components |
| 17 rm -rf ../../web-animations-js/sources | 31 rm -rf ../../web-animations-js/sources |
| 18 | 32 |
| 19 bower install --no-color | 33 bower install --no-color |
| 20 | 34 |
| 21 rm components/*/.travis.yml | 35 rm components/*/.travis.yml |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 76 echo | 90 echo |
| 77 echo 'These files appear to have been removed:' | 91 echo 'These files appear to have been removed:' |
| 78 echo "${deleted}" | sed 's/^/ /' | 92 echo "${deleted}" | sed 's/^/ /' |
| 79 fi | 93 fi |
| 80 | 94 |
| 81 if [[ ! -z "${new}${deleted}" ]]; then | 95 if [[ ! -z "${new}${deleted}" ]]; then |
| 82 echo | 96 echo |
| 83 fi | 97 fi |
| 84 | 98 |
| 85 python create_components_summary.py > components_summary.txt | 99 python create_components_summary.py > components_summary.txt |
| OLD | NEW |