#!/bin/bash --
set -e -o pipefail -u -x
#picked from : https://code.justin.tv/web/tmi/blob/master/build_scripts/setup
# fix up virtualenv paths .. this can be factored out and perhaps made to be
# readable .. and correct
find ENV/lib/python*/site-packages -maxdepth 1 -name '*.pth' \
    -exec sed -e 's!^/.*/ENV/src/\(.*\)$!../../../src/\1!' -i'.tmp' {} \;
find ENV/bin -maxdepth 1 -type f \
    -exec env LANG=C sed -e '1 s,^\#\!.*,\#\!/usr/bin/env python,' -i'.tmp' {} \;
