opensim-tools – Rev 15

Subversion Repositories:
Rev:
#!/bin/bash
###########################################################################
##  Copyright (C) Wizardry and Steamworks 2013 - License: GNU GPLv3      ##
##  Please see: http://www.gnu.org/licenses/gpl.html for legal details,  ##
##  rights of fair usage, the disclaimer and warranty conditions.        ##
###########################################################################

echo "[OpenSim] Updating tools..."
svn update
pushd ./
if [ -d ../opensim-sources ]; then
        cd ../opensim-sources/
        echo "[OpenSim] Updating sources..."
        svn update
        echo "[OpenSim] Cleaning..."
        PKG_CONFIG_PATH=/opt/mono-4-0/lib/pkgconfig make clean
        echo "[OpenSim] Build..."
        PKG_CONFIG_PATH=/opt/mono-4-0/lib/pkgconfig make
        if [ -d /home/opensim/os ]; then 
                echo "[OpenSim] Copying files..."
                mkdir -p /home/opensim/os
                find bin/ -name \*.ini -exec rm -rf '{}' \;
                find bin/ -name \*.config -exec rm -rf '{}' \;
                cp -Ra bin/* /home/opensim/os/
                echo "[OpenSim] Changing ownership..."
                chown -R opensim:opensim /home/opensim/os/
        fi
fi
if [ -d ../opensim-config ]; then
        echo "[OpenSim] Updating configuration..."
        cd ../opensim-config/
        svn update
        cp -Ra * /home/opensim/os/
fi
if [ -d /var/opensim-www ]; then
        echo "[OpenSim] Updating website..."
        cd /var/opensim-www/
        svn update
        chown -R www-data:www-data /var/opensim-www
        service lighttpd restart
fi
echo "[OpenSim] Restarting OpenSim."
kill -s HUP `pidof mono`
echo "[OpenSim] Done."
popd