#!/bin/bash

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
