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

Issue 6591056: Add check_for_file and check_for_tool functions to common.sh (Closed)

Created:
9 years, 9 months ago by robotboy
Modified:
9 years, 7 months ago
Reviewers:
davidjames, anush
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, anush, sosa
Visibility:
Public.

Description

Add check_for_file and check_for_tool functions to common.sh These functions make it easy to do testing in scripts for required files and tools and provide useful error messages when the files or tools are not found. BUG=chromium-os:11981 TEST=run cros_sign_bootstub in configurations that test all paths in these functions. Change-Id: Ia63cfabd1eecba6473331b756486745d71e6b699 Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=6f5262d

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use die instead of error. #

Total comments: 1

Patch Set 3 : Added comment about padding. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -0 lines) Patch
M common.sh View 1 2 1 chunk +45 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
robotboy
9 years, 9 months ago (2011-02-28 23:04:59 UTC) #1
davidjames
http://codereview.chromium.org/6591056/diff/1/common.sh File common.sh (right): http://codereview.chromium.org/6591056/diff/1/common.sh#newcode660 common.sh:660: error "No ${name} file specified." && exit 1. Looks ...
9 years, 9 months ago (2011-03-01 00:09:49 UTC) #2
robotboy
Too right, fixed. PTAL. Thanks, Anton http://codereview.chromium.org/6591056/diff/1/common.sh File common.sh (right): http://codereview.chromium.org/6591056/diff/1/common.sh#newcode660 common.sh:660: error "No ${name} ...
9 years, 9 months ago (2011-03-01 00:20:19 UTC) #3
davidjames
9 years, 9 months ago (2011-03-01 00:31:54 UTC) #4
LGTM w/nit

http://codereview.chromium.org/6591056/diff/4001/common.sh
File common.sh (right):

http://codereview.chromium.org/6591056/diff/4001/common.sh#newcode653
common.sh:653: # show the user the name and path of the file that will be used.
Can you show an example use case here? Took me a few minutes to understand what
the padding argument is for, so an example here with the output it generates
would be helpful.

Powered by Google App Engine
This is Rietveld 408576698