#!/bin/bash function setuppy { pip install -r requirements.txt pip install -r test_requirements.txt python setup.py develop } function setupjs { cd ../web-ui LC_ALL=en_US.UTF-8 ./go build cd - } function runIntegrationTests { nosetests "${@:2}" test/integration } function runUnitTests { nosetests "${@:2}" test/unit } function runPep8 { pep8 pixelated test --ignore=E501 } if [ "$1" == 'test' ]; then runPep8 runUnitTests runIntegrationTests elif [ "$1" == 'unit' ]; then runUnitTests elif [ "$1" == 'integration' ]; then runIntegrationTests elif [ "$1" == 'pep8' ]; then runPep8 elif [ "$1" == 'setuppy' ]; then setuppy elif [ "$1" == 'setupjs' ]; then setupjs elif [ "$1" == 'setup' ]; then setupjs setuppy elif [ "$1" == 'start' ]; then /usr/bin/env pixelated-user-agent "${@:2}" else python setup.py $* fi