Add optional --yes argument to tools/install_dependencies.sh.

This helps build automation.

Bug: skia:11124
Change-Id: I529f525845fb151861afc19651cdedcc0baa075d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/348196
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
This commit is contained in:
Joe Gregorio 2020-12-29 10:15:15 -05:00 committed by Skia Commit-Bot
parent ab8ed92a0c
commit 7d63f91e4a

View File

@ -8,6 +8,9 @@
# dependencies using your system's package manager. If your system is
# not supported, add logic here to support it.
# Pass in --yes as the first argument to force apt-get to skip Y/n prompts while
# being backward compatible with the old behavior.
set -e
# Return 0 iff all package name arguments are installed.
@ -43,7 +46,7 @@ if command -v lsb_release > /dev/null ; then
PACKAGES="${PACKAGES} ninja-build"
fi
if ! dpkg_all_installed $PACKAGES; then
sudo apt-get install $PACKAGES
sudo apt-get $1 install $PACKAGES
fi
exit
;;