/usr/share/pennmush/game/txt/compose.sh.SH is in pennmush-common 1.8.2p8-1.1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | #!/bin/sh
case $CONFIG in
'')
if test -f config.sh; then TOP=.;
elif test -f ../config.sh; then TOP=..;
elif test -f ../../config.sh; then TOP=../..;
elif test -f ../../../config.sh; then TOP=../../..;
elif test -f ../../../../config.sh; then TOP=../../../..;
else
echo "Can't find config.sh."; exit 1
fi
. $TOP/config.sh
;;
esac
: This forces SH files to create target in same directory as SH file.
: This is so that make depend always knows where to find SH derivatives.
case "$0" in
*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
esac
echo "Extracting compose.sh (with variable substitutions)"
: This section of the file will have variable substitutions done on it.
: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
: Protect any dollar signs and backticks that you do not want interpreted
: by putting a backslash in front. You may delete these comments.
$spitshell >compose.sh <<!GROK!THIS!
#!/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-none}
test=$test
cat=$cat
rm=$rm
echo=$echo
!GROK!THIS!
: In the following dollars and backticks do not need the extra backslash.
$spitshell >>compose.sh <<'!NO!SUBS!'
# 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.
!NO!SUBS!
chmod 755 compose.sh
$eunicefix compose.sh
|