[2] | 1 | #!/bin/sh |
---|
| 2 | |
---|
| 3 | cd `dirname $0` |
---|
| 4 | |
---|
| 5 | # explicitly attempt to fetch eggs before running |
---|
| 6 | FETCH_EGGS=1 |
---|
| 7 | for arg in "$@"; do |
---|
| 8 | [ "$arg" = "--stop-daemon" ] && FETCH_EGGS=0; break |
---|
| 9 | done |
---|
| 10 | if [ $FETCH_EGGS -eq 1 ]; then |
---|
| 11 | python ./scripts/check_eggs.py quiet |
---|
| 12 | if [ $? -ne 0 ]; then |
---|
| 13 | echo "Some eggs are out of date, attempting to fetch..." |
---|
| 14 | python ./scripts/fetch_eggs.py |
---|
| 15 | if [ $? -eq 0 ]; then |
---|
| 16 | echo "Fetch successful." |
---|
| 17 | else |
---|
| 18 | echo "Fetch failed." |
---|
| 19 | exit 1 |
---|
| 20 | fi |
---|
| 21 | fi |
---|
| 22 | fi |
---|
| 23 | |
---|
| 24 | # Temporary: since builds.txt is now removed from source control, create it |
---|
| 25 | # from the sample if necessary |
---|
| 26 | if [ ! -f "tool-data/shared/ucsc/builds.txt" ]; then |
---|
| 27 | cp tool-data/shared/ucsc/builds.txt.sample tool-data/shared/ucsc/builds.txt |
---|
| 28 | fi |
---|
| 29 | |
---|
| 30 | python ./scripts/paster.py serve universe_wsgi.ini $@ |
---|