diff options
author | petermayo@chromium.org <petermayo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-23 04:48:31 +0000 |
---|---|---|
committer | petermayo@chromium.org <petermayo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-23 04:48:31 +0000 |
commit | e2544ed410d44bbcd5c26e049128e697dd143be6 (patch) | |
tree | 05c49af9a20e0aefa2f2ff82d9429f815c692cbb /build/install-build-deps.sh | |
parent | 65cd7365fd60ab2d2285645cf96c133142524fe4 (diff) | |
download | chromium_src-e2544ed410d44bbcd5c26e049128e697dd143be6.zip chromium_src-e2544ed410d44bbcd5c26e049128e697dd143be6.tar.gz chromium_src-e2544ed410d44bbcd5c26e049128e697dd143be6.tar.bz2 |
Add a --no-prompt flag to install quietly.
R=cmp@chromium.org,nsylvain@chromium.org
BUG=124546
TEST=on a victim that didn't need to change, and on one that did.
Review URL: http://codereview.chromium.org/10166023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133404 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/install-build-deps.sh')
-rwxr-xr-x | build/install-build-deps.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/build/install-build-deps.sh b/build/install-build-deps.sh index 5ee1935..c2b8909 100755 --- a/build/install-build-deps.sh +++ b/build/install-build-deps.sh @@ -13,6 +13,7 @@ usage() { echo "Options:" echo "--[no-]syms: enable or disable installation of debugging symbols" echo "--[no-]lib32: enable or disable installation of 32 bit libraries" + echo "--no-prompt: silently select standard options/defaults" echo "Script will prompt interactively if options not given." exit 1 } @@ -24,6 +25,9 @@ do --no-syms) do_inst_syms=0;; --lib32) do_inst_lib32=1;; --no-lib32) do_inst_lib32=0;; + --no-prompt) do_default=1 + do_quietly="-qq --assume-yes" + ;; *) usage;; esac shift @@ -122,6 +126,9 @@ fi # The function will echo the user's selection followed by a newline character. # Users can abort the function by pressing CTRL-C. This will call "exit 1". yes_no() { + if [ 0 -ne "${do_default-0}" ] ; then + return $1 + fi local c while :; do c="$(trap 'stty echo -iuclc icanon 2>/dev/null' EXIT INT TERM QUIT @@ -194,7 +201,7 @@ elif [ $? -eq 1 ]; then echo "No missing packages, and the packages are up-to-date." else echo "Installing missing packages: $new_list." - sudo apt-get install ${new_list} + sudo apt-get install ${do_quietly-} ${new_list} fi echo else |