mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-17 10:10:25 +00:00
Merge pull request #1271 from rallytime/fix-pip-pkg-loop
Handle commented lines in the requirements files for pip pkgs
This commit is contained in:
commit
5626154a91
1 changed files with 4 additions and 2 deletions
|
@ -3788,8 +3788,10 @@ install_centos_git_deps() {
|
|||
fi
|
||||
|
||||
if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then
|
||||
for SINGLE_PACKAGE in $_PIP_PACKAGES; do
|
||||
__REQUIRED_VERSION="$(grep "${SINGLE_PACKAGE}" "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")"
|
||||
# Filter out any commented lines from the requirements file
|
||||
_REQ_LINES="$(grep '^[^#]' "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")"
|
||||
for SINGLE_PACKAGE in ${_PIP_PACKAGES}; do
|
||||
__REQUIRED_VERSION="$(grep "${SINGLE_PACKAGE}" "${_REQ_LINES}")"
|
||||
if [ "${__REQUIRED_VERSION}" != "" ]; then
|
||||
_PIP_PACKAGES=$(echo "$_PIP_PACKAGES" | sed "s/${SINGLE_PACKAGE}/${__REQUIRED_VERSION}/")
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue