#/bin/bash

# A small patching script to allow building on mono 1.0.x (mcs bug)
# Creeates a few symlinks

function Configure {
    echo "   Patching for mono 1.0.x..."
    echo "   (making symlinks)"
    ln -sf "../Util/Util.dll" "MovieDatabase/Util.dll"
    ln -sf "../MovieDatabase/MovieDatabase.dll" "PluginLib/MovieDatabase.dll"
    ln -sf "../Util/Util.dll" "PluginLib/Util.dll"
    exit 0;
}

function Purge {
    echo "   Purging mono 1.0.x patch..."

    rm -f "MovieDatabase/Util.dll" > /dev/null
    rm -f "PluginLib/MovieDatabase.dll" > /dev/null
    rm -f "PluginLib/Util.dll" > /dev/null



    exit 0
}


if [ "$1" == "--configure" ] ; then Configure ; fi
if [ "$1" == "--purge" ] ; then Purge ; fi

echo "You're not supposed to run this script by yourself..."
exit -1



