environment_path export WORKON_HOME var www virtualenvs source usr loc

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
environment_path()
{
export WORKON_HOME=/var/www/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh || failed "error $? at source /usr/local/bin/virtualenvwrapper.sh"
workon $project_original || failed "error $? at workon $project"
export DJANGO_SETTINGS_MODULE=$project_original.settings
export $project_upper"_CONFIG_PATH"=/var/www/edu/$project/conf
}
db_list=[tm_ssuz_udmurtia tm_ssuz_tyumen tm_ssuz_murmansk]
for idb in $db_list
do
echo $idb #tm_ssuz_udmurtia
environment_path
echo $idb #tm_ssuz_udmurtia
db_list=[tm_ssuz_udmurtia tm_ssuz_tyumen tm_ssuz_murmansk]
for i in $db_list
do
echo $i #tm_ssuz_udmurtia
environment_path
echo $i #1