compose.sh.in
pennmush-1.8.3p3/game/txt/compose.sh.in · 959 B
From the archive pennmush-1.8.3p3.tar.gz
Download the archive « Back to the archive contents
#!/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.