| 
0
 | 
     1 #!/usr/bin/bash
 | 
| 
 | 
     2 
 | 
| 
 | 
     3 # installation script for pyloader
 | 
| 
 | 
     4 # Load python attributes from a string
 | 
| 
 | 
     5 
 | 
| 
 | 
     6 REPO='http://k0s.org/hg/pyloader'
 | 
| 
 | 
     7 DEST='pyloader' # name of the virtualenv
 | 
| 
 | 
     8 
 | 
| 
 | 
     9 if [ "$#" != "0" ]
 | 
| 
 | 
    10 then
 | 
| 
 | 
    11     DEST=$1
 | 
| 
 | 
    12 fi
 | 
| 
 | 
    13 
 | 
| 
 | 
    14 if which virtualenv
 | 
| 
 | 
    15 then
 | 
| 
 | 
    16     virtualenv ${DEST}
 | 
| 
 | 
    17 else
 | 
| 
 | 
    18     curl https://bitbucket.org/ianb/virtualenv/raw/tip/virtualenv.py | python - ${DEST}
 | 
| 
 | 
    19 fi
 | 
| 
 | 
    20 cd ${DEST}
 | 
| 
 | 
    21 . bin/activate # linux only
 | 
| 
 | 
    22 mkdir src
 | 
| 
 | 
    23 cd src
 | 
| 
 | 
    24 hg clone ${REPO}
 | 
| 
 | 
    25 cd pyloader
 | 
| 
 | 
    26 python setup.py develop
 | 
| 
 | 
    27 
 |