[IRCServices] Something for lazy patchers..

Craig McLure Craig at chatspike.net
Mon May 3 20:31:49 PDT 2004


i've found that patching can often be a repetative task, so i've created a small shellscript that will do it for you.

NOTE: i take NO responcibility for what this script does to your services installation (and i'm sure no one else will either). It should work properly, but if used incorrectly can break a lot. (in most cases, its safer to do it by hand)

you execute the script by using ./<name> <version number>
so in my case (as an example) ./patch 5.0.31

The Script will then download the 5.0.31 diff.gz, gunzip it, apply it, silently re-run ./configure, re-compile and re-'install' services. If you plan on using this, please remember to edit the values at the top of the script at they point to where you plan on installing the services binarys and data files (for use in the ./configure componant)

The Script follows (the text BETWEEN (NOT including) the ---'s):
---
#!/bin/sh

# Configure these Parameters..

# Path to the services source directory (Can be relative)
SERVDIR="/path/to/ircservices-5.0.xx"

# FULL PATHS to your services Binary and Data folders.
BINDIR="/path/to/binary/dir"
LIBDIR="/path/to/data/dir"

# You shouldnt need to edit below this line.
if [ -z "$1" ] ; then
  echo "You must enter a version number."
  exit 0
fi
VERSION=$1
PATCHDIR=`pwd`
echo "Attempting to download ircservices-$VERSION.diff.gz from esper.net"
wget -q ftp://ftp.esper.net/ircservices/ircservices-$VERSION.diff.gz
if [ ! -e "ircservices-$VERSION.diff.gz" ] ; then
 echo "Services Version $VERSION Does Not Exist."
 exit 0
fi
gunzip ircservices-$VERSION.diff.gz
cd $SERVDIR
patch -p1 < $PATCHDIR/ircservices-$VERSION.diff
echo "Download and Patch successful, silently running ./configure.."
./configure -bindest $BINDIR -datdest $LIBDIR >> /dev/null
echo "Done! re-compiling and installing."
make
make install
echo "Completed Successfully."
---

As i say, i dont use this script (it was just something i made cause i was bored) although i can say it does work when used properly. If it doesnt work for you, dont use it. I'm not planning on supporting this in any way.

Thanks.

/****************************************
 *     Craig "FrostyCoolSlug" McLure
 * InspIRCd   - http://www.inspircd.org  - REVIVED
 * ChatSpike  - http://www.chatspike.net
 ****************************************/