#!/bin/bash

#  Copyright 2015-2016 bill-auger <https://github.com/bill-auger/av-caster/issues>
#
#  This file is part of the AvCaster program.
#
#  AvCaster is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License version 3
#  as published by the Free Software Foundation.
#
#  AvCaster 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 AvCaster.  If not, see <http://www.gnu.org/licenses/>.


SCRIPTS_DIR="$(dirname "$(readlink -f "$0")")"
PROJECT_DIR=$SCRIPTS_DIR/../../
BASE_INC_DIR=/usr/include
LIBIRC_INC_DIR=$BASE_INC_DIR/libircclient/


cp $SCRIPTS_DIR/cppcheck-filtered $PROJECT_DIR/ ; chmod a+x $PROJECT_DIR/cppcheck-filtered ;
cp $SCRIPTS_DIR/dbg               $PROJECT_DIR/ ; chmod a+x $PROJECT_DIR/dbg               ;
cp $SCRIPTS_DIR/mk                $PROJECT_DIR/ ; chmod a+x $PROJECT_DIR/mk                ;
cp $SCRIPTS_DIR/mk-clean          $PROJECT_DIR/ ; chmod a+x $PROJECT_DIR/mk-clean          ;
cp $SCRIPTS_DIR/mk-reset          $PROJECT_DIR/ ; chmod a+x $PROJECT_DIR/mk-reset          ;

echo "copied helper scripts to the project root directory - they can be now run from there"
exit # TODO: chat feature next version?
if [ ! -d $LIBIRC_INC_DIR ] ; then
  sudo mkdir                                $LIBIRC_INC_DIR
  sudo cp $BASE_INC_DIR/libircclient.h      $LIBIRC_INC_DIR
  sudo cp $BASE_INC_DIR/libirc_errors.h     $LIBIRC_INC_DIR
  sudo cp $BASE_INC_DIR/libirc_events.h     $LIBIRC_INC_DIR
  sudo cp $BASE_INC_DIR/libirc_options.h    $LIBIRC_INC_DIR
  sudo cp $BASE_INC_DIR/libirc_rfcnumeric.h $LIBIRC_INC_DIR

  echo "copied libircclient headers to $LIBIRC_INC_DIR"
fi
