Files
heroku-buildpack-python/bin/detect
T
Kenneth Reitz aefde88d24 &&
2012-03-06 04:50:44 -05:00

12 lines
357 B
Bash
Executable File

#!/usr/bin/env bash
# bin/detect <build-dir>
BUILD_DIR=$1
if [ ! -f $BUILD_DIR/requirements.txt ] && [ ! -f $BUILD_DIR/setup.py ]; then
exit 1
fi
# 'Python/Django' if there is a [mysite]/settings.py file present; otherwise 'Python'
ls $BUILD_DIR/**/settings.py &> /dev/null && (grep -Fiq "django" requirements.txt) && echo Python/Django || echo Python