Skip to content

Instantly share code, notes, and snippets.

@geertj
Last active August 18, 2016 15:47
Show Gist options
  • Save geertj/dc309fed55610f31726c5820651a298b to your computer and use it in GitHub Desktop.
Save geertj/dc309fed55610f31726c5820651a298b to your computer and use it in GitHub Desktop.
IMGFAC_SRC="/build/imagefactory"
ETC_IMGFAC_PLUGINS="/etc/imagefactory/plugins.d"
PYTHON_PATH="/usr/lib/python2.7"
if [ ! -d $IMGFAC_SRC ]
then
echo "Must Clone image factory in $IMGFAC_SRC"
exit 1
fi
# Enable development mode. If imagefactory were to use setuptools,
# we could simply run "python setup.py develop" above.
cd $IMGFAC_SRC
python setup.py sdist build
cd imagefactory_plugins
python setup.py sdist build
echo $IMGFAC_SRC > $PYTHON_PATH/site-packages/imgfacdev.pth
# Link the plugins *.info files into the "plugins.d" directory.
mkdir -p $ETC_IMGFAC_PLUGINS
for PLUGIN in $IMGFAC_SRC/imagefactory_plugins/*/*.info
do
ln -s -v -f $PLUGIN $ETC_IMGFAC_PLUGINS
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment