|
Revision 846, 0.9 kB
(checked in by penndev, 1 year ago)
|
PennMUSH 1.8.3p2 release candidate.
|
| Line | |
|---|
| 1 |
#!/bin/sh |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
perl=@PERL@ |
|---|
| 15 |
test=@TEST@ |
|---|
| 16 |
cat=@CAT@ |
|---|
| 17 |
rm=@RM@ |
|---|
| 18 |
echo=@ECHO@ |
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
dir=$1 |
|---|
| 25 |
if $test ! -d $dir; then |
|---|
| 26 |
$echo "Usage: compose.sh <directory>" |
|---|
| 27 |
exit 0 |
|---|
| 28 |
fi |
|---|
| 29 |
|
|---|
| 30 |
index_args=$2 |
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
cd $dir |
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
$rm -f index.$dir |
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
$echo Building index for $dir... |
|---|
| 40 |
if $test -f $perl; then |
|---|
| 41 |
$cat *.$dir | tee ../$dir.txt | $perl ../index-files.pl $index_args > index.$dir |
|---|
| 42 |
$cat index.$dir >> ../$dir.txt |
|---|
| 43 |
else |
|---|
| 44 |
$cat *.$dir > ../$dir.txt |
|---|
| 45 |
fi |
|---|
| 46 |
|
|---|
| 47 |
cd .. |
|---|
| 48 |
|
|---|
| 49 |
$echo Done. |
|---|
| 50 |
$echo Remember to use @readcache if the mush is currently running. |
|---|
| 51 |
|
|---|