LEFT | RIGHT |
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 # This file is part of the Juju GUI, which lets users view and manage Juju | 3 # This file is part of the Juju GUI, which lets users view and manage Juju |
4 # environments within a graphical interface (https://launchpad.net/juju-gui). | 4 # environments within a graphical interface (https://launchpad.net/juju-gui). |
5 # Copyright (C) 2012-2013 Canonical Ltd. | 5 # Copyright (C) 2012-2013 Canonical Ltd. |
6 # | 6 # |
7 # This program is free software: you can redistribute it and/or modify it under | 7 # This program is free software: you can redistribute it and/or modify it under |
8 # the terms of the GNU Affero General Public License version 3, as published by | 8 # the terms of the GNU Affero General Public License version 3, as published by |
9 # the Free Software Foundation. | 9 # the Free Software Foundation. |
10 # | 10 # |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 createvenv() { | 26 createvenv() { |
27 # Create a virtualenv if it does not exist, or it is older than requirements
. | 27 # Create a virtualenv if it does not exist, or it is older than requirements
. |
28 retcode=0 | 28 retcode=0 |
29 if [ ! -f "$ACTIVATE" -o "$TEST_REQUIREMENTS" -nt "$ACTIVATE" -o "$SERVER_RE
QUIREMENTS" -nt "$ACTIVATE" ]; then | 29 if [ ! -f "$ACTIVATE" -o "$TEST_REQUIREMENTS" -nt "$ACTIVATE" -o "$SERVER_RE
QUIREMENTS" -nt "$ACTIVATE" ]; then |
30 virtualenv --distribute $VENV | 30 virtualenv --distribute $VENV |
31 . $ACTIVATE && \ | 31 . $ACTIVATE && \ |
32 yes w | env BZR_PLUGIN_PATH='-user' \ | 32 yes w | env BZR_PLUGIN_PATH='-user' \ |
33 pip install --use-mirrors -r $TEST_REQUIREMENTS --find-links deps | 33 pip install --use-mirrors -r $TEST_REQUIREMENTS --find-links deps |
34 retcode=$? | 34 retcode=$? |
35 [ $retcode -eq 0 ] && touch $ACTIVATE || rm -f $ACTIVATE | 35 [ $retcode -eq 0 ] && touch $ACTIVATE || touch $TEST_REQUIREMENTS |
36 fi | 36 fi |
37 return $retcode | 37 return $retcode |
38 } | 38 } |
39 | 39 |
40 | 40 |
41 createvenv | 41 createvenv |
LEFT | RIGHT |