Files
deb-python-rtslib-fb/debian/python-rtslib.postinst
Nicholas Bellinger a0a62b501e Initial rtslib commit
Signed-off-by: Nicholas A. Bellinger <nab@risingtidesystems.com>
2011-05-04 21:00:00 +00:00

18 lines
545 B
Bash
Executable File

#!/bin/sh
for lib in lib lib64; do
for python in python2.5 python2.6; do
if [ -e /usr/${lib}/${python} ]; then
if [ ! -e /usr/${lib}/${python}/rtslib ]; then
mkdir /usr/${lib}/${python}/rtslib
for source in /usr/share/python-support/rtslib/rtslib/*.py; do
ln -sf ${source} /usr/${lib}/${python}/rtslib/
done
python_path=$(which ${python} 2>/dev/null)
if [ ! -z $python_path ]; then
${python} -c "import compileall; compileall.compile_dir('/usr/${lib}/${python}/rtslib', force=1)"
fi
fi
fi
done
done