From 50b62cecc7786dd9ef02dce09262a02c52acd25a Mon Sep 17 00:00:00 2001 From: Matt Thompson Date: Thu, 3 Mar 2016 11:51:14 +0000 Subject: [PATCH] Fix how we update requirements.txt Currently, running sources-branch-updater.sh results in a requirements.txt that looks like this: pip==8.0.3 setuptools==20.2.2 wheel==0.29.0 setuptools==20.1.1 wheel==0.29.0 This is because at the top of the script we overwrite IFS and then at the bottom we do not correctly loop over $PIP_CURRENT_OPTIONS. This commit simply unsets IFS at the bottom so the loop can properly iterate over $PIP_CURRENT_OPTIONS. Change-Id: I16cc7070560f8e80b410cf5bf58675cb3f35e09a --- scripts/sources-branch-updater.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/sources-branch-updater.sh b/scripts/sources-branch-updater.sh index ee1835aec7..be8e5ce191 100755 --- a/scripts/sources-branch-updater.sh +++ b/scripts/sources-branch-updater.sh @@ -135,6 +135,8 @@ for repo in $(grep 'git_repo\:' ${SERVICE_FILE}); do done +unset IFS + # Finally, update the PIP_INSTALL_OPTIONS with the current versions of pip, wheel and setuptools PIP_CURRENT_OPTIONS=$(./scripts/get-pypi-pkg-version.py -p pip setuptools wheel -l horizontal) sed -i.bak "s|^PIP_INSTALL_OPTIONS=.*|PIP_INSTALL_OPTIONS=\$\{PIP_INSTALL_OPTIONS:-'${PIP_CURRENT_OPTIONS}'\}|" scripts/scripts-library.sh