Chromium Code Reviews| Index: third_party/polymer/v1_0/reproduce.sh |
| diff --git a/third_party/polymer/v1_0/reproduce.sh b/third_party/polymer/v1_0/reproduce.sh |
| index ba895a4b48b1ecd6b7009c01d21d81a3c148d9e0..7c8833a5c130af0544edcfe57cf2564c7a599bf5 100755 |
| --- a/third_party/polymer/v1_0/reproduce.sh |
| +++ b/third_party/polymer/v1_0/reproduce.sh |
| @@ -9,6 +9,20 @@ |
| # Chromium specific modifications. To launch the script you need 'bower' and |
| # 'crisper' installed on your system. |
| +check_dep() { |
| + 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
|
| + if [ $? -ne 0 ]; then |
| + echo >&2 "This script requires $2." |
| + echo >&2 "Have you tried $3?" |
| + exit 1 |
| + fi |
| +} |
| + |
| +check_dep "which npm" "npm" "visiting https://nodejs.org/en/" |
| +check_dep "which bower" "bower" "npm install -g bower" |
| +check_dep "which crisper" "crisper" "npm install -g crisper" |
| +check_dep "which rsync" "rsync" "apt-get install rsync" |
| + |
| set -e |
| cd "$(dirname "$0")" |