Merge "Fix install-bindeps.sh to work without sudo"

This commit is contained in:
Zuul 2021-04-08 13:46:48 +00:00 committed by Gerrit Code Review
commit 36b625c526
1 changed files with 2 additions and 1 deletions

View File

@ -3,8 +3,9 @@
set -ex set -ex
INSTALL_PACKAGE=$(which yum || which apt) INSTALL_PACKAGE=$(which yum || which apt)
SUDO=$(which sudo || true)
if ! tox -e bindep ; then if ! tox -e bindep ; then
.tox/bindep/bin/bindep -b | xargs -r sudo "${INSTALL_PACKAGE}" install -y .tox/bindep/bin/bindep -b | xargs -r ${SUDO} "${INSTALL_PACKAGE}" install -y
.tox/bindep/bin/bindep .tox/bindep/bin/bindep
fi fi