Files
heroku-buildpack-python/bin/steps/pylibmc
T
2012-03-23 15:59:15 -04:00

23 lines
626 B
Bash

#!/usr/bin/env bash
VENDORED_MEMCACHED="http://cl.ly/0a191R3K160t1w1P0N25/vendor-libmemcached.tar.gz"
# if pylibmc within requirements, use vendored libmemcached
if (grep -Fiq "pylibmc" requirements.txt)
then
echo "-----> Noticed pylibmc. Bootstrapping libmemcached."
cd .heroku
if [ -d "vendor/lib/sasl2" ]; then
export LIBMEMCACHED=$(pwd)/vendor
else
curl -s -L -o tmp-libmemcached.tar.gz $VENDORED_MEMCACHED
tar -zxvf tmp-libmemcached.tar.gz > /dev/null
rm tmp-libmemcached.tar.gz
export LIBMEMCACHED=$(pwd)/vendor
fi
export LIBMEMCACHED=$(pwd)/vendor
cd ..
fi