#!/bin/bash
# Copyright (C) 2012 Brett Ponsler
# This file is part of pysiriproxy.
#
# pysiriproxy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# pysiriproxy is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pysiriproxy.  If not, see <http://www.gnu.org/licenses/>.
# Build and install amp, and then pysiriproxy.

# Build and install pysiriproxy onto the local machine.
py=/usr/bin/python
$py setup.py build && sudo $py setup.py install && pushd doc >> /dev/null && make html && popd >> /dev/null

# Copy the configuration data to the user's configuration directory
# Be sure to exclude all SVN directories
echo "Copying configuration files into pysiriproxy config directory..."
rsync -av --exclude='.svn' ./config/ ~/.pysiriproxy/.