<commit_before>#!/bin/bash

case $1 in
    "2.4")
        python_version=2.4
        ;;
    "2.5")
        python_version=2.5
        ;;
    "2.6")
        python_version=2.6
        ;;
    *)
        echo "---ERROR --- INVALID PARAMETERS $@"
        echo "- Using default python-2.5 - "
        python_version=2.5
        ;;
esac

python_cmd=python$python_version
easy_install_cmd=easy_install-$python_version


# install SATCHMO dependencies
echo "-----------PyCRYPTO---------"
easy_install pycrypto
echo "-----------REPORTLAB---------"
easy_install reportlab
echo "-----------TRML2PDF---------"
easy_install http://www.satchmoproject.com/snapshots/trml2pdf-1.2.tar.gz
echo "-----------DJANGO-REGISTRATION---------"
easy_install django-registration
echo "-----------PyYAML---------"
easy_install PyYAML

echo "-----------DJANGO-THREADED-MULTIHOST---------"
hg clone https://bkroeze@bitbucket.org/bkroeze/django-threaded-multihost/ django-threaded-multihost
cd django-threaded-multihost
$python_cmd setup.py install
cd ..
rm -rf django-threaded-multihost/

echo "-----------DJANGO-APP-PLUGINS---------"
svn checkout http://django-app-plugins.googlecode.com/svn/trunk/ django-app-plugins-read-only
cd django-app-plugins-read-only
$python_cmd setup.py install
cd ..
rm -rf django-app-plugins-read-only/

echo "-----------DJANGO-SIGNALS-AHOY---------"
hg clone http://bitbucket.org/bkroeze/django-signals-ahoy/ django-signals-ahoy
cd django-signals-ahoy
$python_cmd setup.py install
cd ..
rm -rf django-signals-ahoy/

echo "-----------DJANGO-LIVESETTINGS---------"
hg clone http://bitbucket.org/bkroeze/django-livesettings django-livesettings
cd django-livesettings
$python_cmd setup.py install
cd ..
rm -rf django-livesettings/

echo "-----------DJANGO-KEYEDCACHE---------"
hg clone http://bitbucket.org/mmarshall/django-keyedcache django-keyedcache
cd django-keyedcache
$python_cmd setup.py install
cd ..
rm -rf django-keyedcache/

echo "-----------SATCHMO---------"
hg clone http://bitbucket.org/chris1610/satchmo/ satchmo-trunk
cd satchmo-trunk
$python_cmd setup.py install
cd ..
rm -rf satchmo-trunk




# OPTIONAL FOR DOCUMENTATION

#echo "-----------SPHINX---------"
# $easy_install_cmd Sphinx
#echo "-----------DOCUTILS---------"
# $easy_install_cmd docutils
<commit_msg>satchmo install script take --home variable into account<commit_after>#!/bin/bash

case $1 in
    "2.4")
        python_version=2.4
        ;;
    "2.5")
        python_version=2.5
        ;;
    "2.6")
        python_version=2.6
        ;;
    *)
        echo "---ERROR --- INVALID PARAMETERS $@"
        echo "- Using default python-2.5 - "
        python_version=2.5
        ;;
esac

homedir='/home/simuser'

python_cmd=python$python_version setup.py install --home=$homedir
easy_install_cmd=easy_install-$python_version


# install SATCHMO dependencies
echo "-----------PyCRYPTO---------"
$easy_install_cmd pycrypto
echo "-----------REPORTLAB---------"
$easy_install_cmd reportlab
echo "-----------TRML2PDF---------"
$easy_install_cmd http://www.satchmoproject.com/snapshots/trml2pdf-1.2.tar.gz
echo "-----------DJANGO-REGISTRATION---------"
$easy_install_cmd django-registration
echo "-----------PyYAML---------"
$easy_install_cmd PyYAML

echo "-----------DJANGO-THREADED-MULTIHOST---------"
hg clone https://bkroeze@bitbucket.org/bkroeze/django-threaded-multihost/ django-threaded-multihost
cd django-threaded-multihost
$python_cmd
cd ..
rm -rf django-threaded-multihost/

echo "-----------DJANGO-APP-PLUGINS---------"
svn checkout http://django-app-plugins.googlecode.com/svn/trunk/ django-app-plugins-read-only
cd django-app-plugins-read-only
$python_cmd
cd ..
rm -rf django-app-plugins-read-only/

echo "-----------DJANGO-SIGNALS-AHOY---------"
hg clone http://bitbucket.org/bkroeze/django-signals-ahoy/ django-signals-ahoy
cd django-signals-ahoy
$python_cmd
cd ..
rm -rf django-signals-ahoy/

echo "-----------DJANGO-LIVESETTINGS---------"
hg clone http://bitbucket.org/bkroeze/django-livesettings django-livesettings
cd django-livesettings
$python_cmd
cd ..
rm -rf django-livesettings/

echo "-----------DJANGO-KEYEDCACHE---------"
hg clone http://bitbucket.org/mmarshall/django-keyedcache django-keyedcache
cd django-keyedcache
$python_cmd setup.py install
cd ..
rm -rf django-keyedcache/

echo "-----------SATCHMO---------"
hg clone http://bitbucket.org/chris1610/satchmo/ satchmo-trunk
cd satchmo-trunk
$python_cmd
cd ..
rm -rf satchmo-trunk


# OPTIONAL FOR DOCUMENTATION

#echo "-----------SPHINX---------"
# $easy_install_cmd Sphinx
#echo "-----------DOCUTILS---------"
# $easy_install_cmd docutils

{'fraction_non_alphanumeric': 0.21685173089483997, 'fraction_numerical': 0.010886131069018071, 'mean_word_length': 2.3606437454279443, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4927851', 'n_tokens_mistral': 1632, 'n_tokens_neox': 1535, 'n_words': 293}