From bcf85091b0750dddea73fedf069771043fbf8ec8 Mon Sep 17 00:00:00 2001 From: Nikolay Mahotkin Date: Fri, 30 May 2014 16:14:23 +0400 Subject: [PATCH] Restore script update_env_deps in tools * update_env_deps was deleted. We need this script so it is restored. Change-Id: I960258a75c2a73b17c1a2678ea79523cb93e9fa1 --- tools/update_env_deps | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 tools/update_env_deps diff --git a/tools/update_env_deps b/tools/update_env_deps new file mode 100755 index 000000000..5551dafe7 --- /dev/null +++ b/tools/update_env_deps @@ -0,0 +1,16 @@ +TOX_ENVLIST=`grep envlist tox.ini | cut -d '=' -f 2 | tr ',' ' '` +TESTENVS=`grep testenv tox.ini | awk -F ':' '{print $2}' | tr '[]' ' '` +UNFILTERED_ENVLIST=`echo "$TOX_ENVLIST $TESTENVS"` +ENVLIST=$( awk 'BEGIN{RS=ORS=" "}!a[$0]++' <<<$UNFILTERED_ENVLIST ); +for env in $ENVLIST +do + ENV_PATH=.tox/$env + PIP_PATH=$ENV_PATH/bin/pip + echo -e "\nUpdate environment ${env}...\n" + if [ ! -d $ENV_PATH -o ! -f $PIP_PATH ] + then + tox --notest -e$env + else + $PIP_PATH install -r requirements.txt -r test-requirements.txt + fi +done