diff options
| author | Devendra | 2014-05-03 00:23:55 +0530 | 
|---|---|---|
| committer | Devendra | 2014-05-03 00:23:55 +0530 | 
| commit | fc9ef45293540a2a5ff8f6dde5481442f4349f0c (patch) | |
| tree | 5cc3558642eab8aef50d6560ef110101b1e61d3e /python | |
| parent | 57d27fe29751f9cbd14a26d2a4ee8402168bfe8b (diff) | |
| download | pubnub-python-fc9ef45293540a2a5ff8f6dde5481442f4349f0c.tar.bz2 | |
adding virtualenv creation and installation of dependencies to start-console
Diffstat (limited to 'python')
| -rwxr-xr-x[-rw-r--r--] | python/examples/start-console.sh | 22 | 
1 files changed, 22 insertions, 0 deletions
| diff --git a/python/examples/start-console.sh b/python/examples/start-console.sh index 128a20e..a928cb3 100644..100755 --- a/python/examples/start-console.sh +++ b/python/examples/start-console.sh @@ -1,4 +1,26 @@  #!/bin/bash + +#!/bin/bash -e + +BASEDIR=. + +if [ ! -d "$BASEDIR/ve" ]; then +    virtualenv -q $BASEDIR/ve --no-site-packages +    $BASEDIR/ve/bin/activate +    echo "Virtualenv created." +fi + +chmod 755 $BASEDIR/ve/bin/activate +$BASEDIR/ve/bin/activate + +if [ ! -f "$BASEDIR/ve/updated" -o $BASEDIR/requirements.pip -nt $BASEDIR/ve/updated ]; then +    pip install -r $BASEDIR/requirements.pip -E $BASEDIR/ve +    touch $BASEDIR/ve/updated +    echo "Requirements installed." +fi + + +  if ! type "screen" > /dev/null; then      echo "[ERROR] Screen is not installed. Please install screen to use this utility ."      exit | 
