pennmush-1.8.3p3/game/data/
pennmush-1.8.3p3/game/log/
pennmush-1.8.3p3/game/save/
pennmush-1.8.3p3/game/txt/evt/
pennmush-1.8.3p3/game/txt/nws/
pennmush-1.8.3p3/po/
pennmush-1.8.3p3/win32/msvc.net/
pennmush-1.8.3p3/win32/msvc6/
#!/bin/sh
#
# compose.sh: a shell script for putting together help.txt, etc.
#
# Usage: compose.sh <directory>
# Example: compose.sh help
#
# This script calls index-files.pl
# 
# By Alan Schwartz (Javelin/Paul)
#

# These come from Configure
perl=@PERL@
test=@TEST@
cat=@CAT@
rm=@RM@
echo=@ECHO@

# This process can eat CPU, so uncomment if you want to be nice
#/etc/renice +4 $$

# What subdirectories should we be processing?
dir=$1
if $test ! -d $dir; then
  $echo "Usage: compose.sh <directory>"
  exit 0
fi

index_args=$2

# Ok, let's do 'em:
  cd $dir

  # Remove the old index
  $rm -f index.$dir

  # Build a new index, and tack it on.
  $echo Building index for $dir...
  if $test -f $perl; then
    $cat *.$dir | tee ../$dir.txt | $perl ../index-files.pl $index_args > index.$dir
    $cat index.$dir >> ../$dir.txt
  else
    $cat *.$dir > ../$dir.txt
  fi
 
  cd ..

$echo Done.
$echo Remember to use @readcache if the mush is currently running.