Re: FTP Site and Snippets and Stuff

From: George (greerga@CIRCLEMUD.ORG)
Date: 03/30/98


On Mon, 30 Mar 1998, Tony Robbins wrote:

>I'd say maybe 30% of mailing to this list comes from wanted help on
>snippets and patches and things like:  "I found this bpl11 patch for
>'exploding monkeys' but it won't patch into bpl12"

Which they should be doing by hand to understand and work out the problems
anyway.  You don't learn by doing 'patch < whizbang.patch'.  But if you
would rather run a MUD where you have _no_ idea what your code looks like,
hey, that's your decision.

>I've decided to become the self-appointed emperor of the universe--ack, I
>mean El Patchmaker Grande.  I'm going to begin converting bpl11
>snippets/patches and try to get everything working with bpl12.  And, of
>course, DOCUMENTATION!

All of my patches have an explanation, although I think most people don't
bother to click the link to the page with them.  This is not true of the
FTP site unfortunately.

>Anyway, I plan on going in order down the FTP site, or people can mail me
>directly about specific things on there that they have problems with and I
>will gladly try to fix them first.  (Ugh, sitting in the house for strep
>throat for a week really cuts down on the energy, but I'm gonna try.)

Well, if you really want to, here's a script I used to test whether my
bpl11 patches worked with bpl12.

Usage:
./testpatch /path/to/patches/*.patch_files_you_want_to_test

--- 8< --- 8< ---
#!/bin/sh

if [ -z "$1" ]; then
  echo What patch would you like to test?
  exit
fi

while [ "$1" ]; do {
  if [ ! -f "$1" ]; then
    echo "$1: not a file."
    shift
    continue
  fi
  echo -n "$1: "
  if [ "`patch -t -s < $1 2>&1 | fgrep failed`" ]; then
    echo FAILED.
  else
    echo ok.
  fi
  if [ "`echo *.orig`" != "*.orig" ]; then
    for i in *.orig; do mv $i `echo $i | sed "s/\.orig//g"`; done
  fi
  rm -f *.{orig,rej}
  shift
} done
--- 8< --- 8< ---

Note that this only works if the patch works on files in the current
directory, it won't work for patches which use src/[files].

I'd personally only fix the patches with major problems (ie: OasisOLC)
besides patching cleanly.  Daniel's object mailing code would qualify
(although he's perfectly capable of doing that himself), but the
autoeq.patch would not since it works just fine under bpl12. (Which,
coincidentally, may soon end up in a patchlevel near you...)

--
George Greer  -  Me@Null.net   | Genius may have its limitations, but stupidity
http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST