roentgen edd579
#!/bin/bash
roentgen edd579
roentgen edd579
while getopts t:d:h OPT
roentgen edd579
do
roentgen edd579
    case $OPT in
roentgen edd579
        t) TOONZREPO=$OPTARG
roentgen edd579
           ;;
roentgen edd579
        d) DIST=$OPTARG
roentgen edd579
           ;;
roentgen edd579
        h) echo "-t opentoonz_repository_dir -d dist_dir"
roentgen edd579
           exit 1;
roentgen edd579
           ;;
roentgen edd579
        \?) exit 1
roentgen edd579
            ;;
roentgen edd579
    esac
roentgen edd579
done
roentgen edd579
roentgen edd579
mkdir -p $DIST
roentgen edd579
pushd $DIST
roentgen edd579
roentgen edd579
mkdir core
roentgen edd579
mkdir utils
roentgen edd579
mkdir doc
roentgen edd579
roentgen edd579
cp $TOONZREPO/LICENSE.txt ./
roentgen edd579
cp $TOONZREPO/toonz/sources/toonzqt/toonz_plugin.h core/
roentgen edd579
cp $TOONZREPO/toonz/sources/toonzqt/toonz_hostif.h core/
roentgen edd579
cp $TOONZREPO/toonz/sources/toonzqt/toonz_params.h core/
roentgen edd579
roentgen edd579
cp $TOONZREPO/plugins/utils/affine.hpp utils/
roentgen edd579
cp $TOONZREPO/plugins/utils/rect.hpp utils/
roentgen edd579
cp $TOONZREPO/plugins/utils/interf_holder.hpp utils/
roentgen edd579
cp $TOONZREPO/plugins/utils/param_traits.hpp utils/
roentgen edd579
roentgen edd579
# copy samples
roentgen edd579
roentgen edd579
mkdir -p samples/blur
roentgen edd579
mkdir -p samples/geom
roentgen edd579
mkdir -p samples/multiplugin
roentgen edd579
roentgen edd579
cp $TOONZREPO/plugins/blur/* samples/blur/
roentgen edd579
cp $TOONZREPO/plugins/geom/* samples/geom/
roentgen edd579
cp $TOONZREPO/plugins/multiplugin/* samples/multiplugin/
roentgen edd579
roentgen edd579
find ./samples -iname CMakeLists.txt -exec sed -e 's/set(PLUGINSDK_ROOT.*)/set(PLUGINSDK_ROOT \.\.\/\.\.\/core)/' -i "" {} \;
roentgen edd579
find ./samples -iname CMakeLists.txt -exec sed -e 's/set(PLUGINSDK_UTILS_PATH.*)/set(PLUGINSDK_UTILS_PATH \.\.\/\.\.\/)/' -i "" {} \;
roentgen edd579
roentgen edd579
popd