#!/bin/sh
#
# small sh script to concatenate the files that were split for posting
#
TOP=`pwd`
DAT=$TOP/dat
DOC=$TOP/doc
SRC=$TOP/src
AMIGA=$TOP/sys/amiga
MAC=$TOP/sys/mac
SHARE=$TOP/sys/share

# dat
cd $DAT
cat quest.tx1 quest.tx2 > quest.txt
if test -f quest.txt
then echo "'quest.txt' made"; rm quest.tx1 quest.tx2
else echo "'quest.txt' not made - do cat by hand"
fi
cd $TOP

# doc
cd $DOC
cat Guidebook.te1 Guidebook.te2 > Guidebook.tex
cat Guidebook.uu1 Guidebook.uu2 | uudecode
if test -f Guidebook.tex
then echo "'Guidebook.tex' made"; rm Guidebook.te1 Guidebook.te2
else echo "'Guidebook.tex' not made - do cat by hand"
fi
if test -f Guidebook.txt
then echo "'Guidebook.txt' made"; rm Guidebook.uu1 Guidebook.uu2
else echo "'Guidebook.txt' not made - do cat and uudecode by hand"
fi
cd $TOP

# src
cd $SRC
cat mhitu.c1 mhitu.c2 > mhitu.c
cat monst.c1 monst.c2 monst.c3 > monst.c
cat shk.c1 shk.c2 > shk.c
cat sp_lev.c1 sp_lev.c2 > sp_lev.c
cat trap.c1 trap.c2 > trap.c
cat vision.c1 vision.c2 > vision.c
cat zap.c1 zap.c2 > zap.c
if test -f mhitu.c
then echo "'mhitu.c' made"; rm mhitu.c1 mhitu.c2
else echo "'mhitu.c' not made - do cat by hand"
fi
if test -f monst.c
then echo "'monst.c' made"; rm monst.c1 monst.c2 monst.c3
else echo "'monst.c' not made - do cat by hand"
fi
if test -f shk.c
then echo "'shk.c' made"; rm shk.c1 shk.c2
else echo "'shk.c' not made - do cat by hand"
fi
if test -f sp_lev.c
then echo "'sp_lev.c' made"; rm sp_lev.c1 sp_lev.c2
else echo "'sp_lev.c' not made - do cat by hand"
fi
if test -f trap.c
then echo "'trap.c' made"; rm trap.c1 trap.c2
else echo "'trap.c' not made - do cat by hand"
fi
if test -f vision.c
then echo "'vision.c' made"; rm vision.c1 vision.c2
else echo "'vision.c' not made - do cat by hand"
fi
if test -f zap.c
then echo "'zap.c' made"; rm zap.c1 zap.c2
else echo "'zap.c' not made - do cat by hand"
fi
cd $TOP

# amiga
cd $AMIGA
cat wb.c1 wb.c2 > wb.c
cat winami.c1 winami.c2 > winami.c
if test -f wb.c
then echo "'wb.c' made"; rm wb.c1 wb.c2
else echo "'wb.c' not made - do cat by hand"
fi
if test -f winami.c
then echo "'winami.c' made"; rm winami.c1 winami.c2
else echo "'winami.c' not made - do cat by hand"
fi
cd $TOP

# mac
cd $MAC
cat NHsound.hq1 NHsound.hq2 NHsound.hq3 NHsound.hq4 > NHsound.hqx
cat macwin.c1 macwin.c2 > macwin.c
if test -f NHsound.hqx
then echo "'NHsound.hqx' made"; rm NHsound.hq1 NHsound.hq2 NHsound.hq3 NHsound.hq4
else echo "'NHsound.hqx' not made - do cat by hand"
fi
if test -f macwin.c
then echo "'macwin.c' made"; rm macwin.c1 macwin.c2
else echo "'macwin.c' not made - do cat by hand"
fi
cd $TOP

# share
cd $SHARE
cat lev_yacc.c1 lev_yacc.c2 > lev_yacc.c
if test -f lev_yacc.c
then echo "'lev_yacc.c' made"; rm lev_yacc.c1 lev_yacc.c2
else echo "'lev_yacc.c' not made - do cat by hand"
fi
cd $TOP

exit 0
