Chromium Code Reviews| Index: build/install-build-deps.sh |
| =================================================================== |
| --- build/install-build-deps.sh (revision 132122) |
| +++ build/install-build-deps.sh (working copy) |
| @@ -24,6 +24,11 @@ |
| --no-syms) do_inst_syms=0;; |
| --lib32) do_inst_lib32=1;; |
| --no-lib32) do_inst_lib32=0;; |
| + --bot) do_default=1 |
| + do_inst_syms=0 |
| + do_inst_lib32=0 |
|
cmp
2012/04/21 19:39:24
can you remove these previous two lines? if you l
Peter Mayo
2012/04/21 21:02:55
I had not considered passing both "use the right d
cmp
2012/04/21 21:17:46
Is there a "right defaults" wrt the lib32+syms fla
|
| + do_quiet=--quiet |
| + ;; |
| *) usage;; |
| esac |
| shift |
| @@ -122,6 +127,9 @@ |
| # 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 |
| @@ -180,7 +188,7 @@ |
| # Intentionally leaving $packages unquoted so it's more readable. |
| echo "Packages required: " $packages |
| echo |
| -new_list_cmd="sudo apt-get install --reinstall $(echo $packages)" |
| +new_list_cmd="sudo apt-get install --reinstall ${do_quiet-} $(echo $packages)" |
|
cmp
2012/04/21 19:39:24
does --quiet imply -y? assuming no, i think you a
Peter Mayo
2012/04/21 21:02:55
--quiet does not, but $do_quiet was supposed to -
|
| if new_list="$(yes n | LANG=C $new_list_cmd)"; then |
| # We probably never hit this following line. |
| echo "No missing packages, and the packages are up-to-date." |
| @@ -194,7 +202,7 @@ |
| 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_quiet-} ${new_list} |
|
cmp
2012/04/21 19:39:24
does --quiet imply -y? assuming no, i think you a
Peter Mayo
2012/04/21 21:02:55
as above.
|
| fi |
| echo |
| else |