#!/bin/sh # # install - UnrealIRCd module installer # # $Id: install,v 1.1 2006/01/11 03:31:43 allan Exp $ # # This program 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 2 of the License, or # (at your option) any later version. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # # This code is modified from the original copy of AngryWolf's "build" # script from the "adwords.tar.gz" package. if [ "`eval echo -n 'a'`" = "-n a" ] ; then c="\c" else n="-n" fi MODFILE=hidehost UNREALDIR=$HOME/Unreal3.2 MODDIR=src/modules if [ -f .install.settings ] ; then . .install.settings fi TEMP=$UNREALDIR echo "" echo "What directory is UnrealIRCd installed in?" echo "WARNING: Do not include a trailing / character!" echo $n "[$TEMP] -> $c" read cc if [ ! -z "$cc" ] ; then UNREALDIR=$cc else UNREALDIR=$TEMP fi TEMP=$MODDIR echo "" echo "What directory are your UnrealIRCd modules (.so files) in?" echo "WARNING: Do not include any leading nor trailing / character!" echo $n "[$TEMP] -> $c" read cc if [ ! -z "$cc" ] ; then MODDIR=$cc else MODDIR=$TEMP fi CURDIR=`pwd` rm -rf $UNREALDIR/$MODDIR/$MODFILE.* cp $MODFILE.c $UNREALDIR/src/modules cd $UNREALDIR make custommodule MODULEFILE=$MODFILE if test $? = "0" ; then echo " " echo " " echo " " echo " " echo " " echo " " echo " " echo " " echo " " echo " " echo " " echo " " echo "******************************" echo " Success -- Module installed. " echo "******************************" echo " " echo " Please read the README file for configuration" echo "instructions." echo " " fi cd $CURDIR cat > .install.settings << EOF UNREALDIR=$UNREALDIR MODDIR=$MODDIR EOF