Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(788)

Unified Diff: third_party/polymer/v1_0/reproduce.sh

Issue 1702833002: Polymer: make reproduce.sh check for tools it depends on (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: +rsync Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/polymer/README.chromium ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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")"
« no previous file with comments | « third_party/polymer/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698