#-----------------------------------------------------------------------------
#
#  dumb bash script for building lout328b.zip
#  Copyright (c) 2003 Kein-Hong Man <mkh.pl.jaring.my>
#  2003-05-20
#
#  NOTE: build_b is the non-LFN version, generated by fixnames.pl
#-----------------------------------------------------------------------------
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either Version 2, or (at your option)
#  any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA
#
#-----------------------------------------------------------------------------
#  Assumes:
#  (1) DJGPP works correctly in a bash shell
#  (2) a free-standing lout328s directory structure
#  (3) lout328b built in the same directory as lout328s
#
#-----------------------------------------------------------------------------
# creates the appropriate directories
#-----------------------------------------------------------------------------

LOUT=lout
LOUTVER=lout-3.28
BNAME=lout328b
DESC="Basser Lout 3.28 for DJGPP V2"

#-----------------------------------------------------------------------------
# creates the appropriate directories
#-----------------------------------------------------------------------------

B=bin
C=contrib
M=manifest
L=lib
MAN=man
CAT=cat5

BASEPATH=../../../$BNAME
BPATH=$BASEPATH/$B
CPATH=$BASEPATH/$C
LPATH=$BASEPATH/$L
MFTPATH=$BASEPATH/$M
CONTRIBPATH=$CPATH/$LOUTVER
LOUTLIBPATH=$LPATH/$LOUT
MANPATH=$BASEPATH/$MAN
CATPATH=$MANPATH/$CAT

cd ..
mkdir -p $BPATH
mkdir -p $CPATH
mkdir -p $LPATH
mkdir -p $MFTPATH
mkdir -p $CONTRIBPATH
mkdir -p $LOUTLIBPATH
mkdir -p $MANPATH
mkdir -p $CATPATH
echo $BNAME directories created...

LIBINCLUDE=include
LIBDATA=data
LIBHYPH=hyph
LIBFONT=font
LIBMAPS=maps
#LIBLOCALE=locale

mkdir -p $LOUTLIBPATH/$LIBINCLUDE
mkdir -p $LOUTLIBPATH/$LIBDATA
mkdir -p $LOUTLIBPATH/$LIBHYPH
mkdir -p $LOUTLIBPATH/$LIBFONT
mkdir -p $LOUTLIBPATH/$LIBMAPS
#mkdir -p $LOUTLIBPATH/$LIBLOCALE
echo $BNAME library directories created...

#-----------------------------------------------------------------------------
# copies over the executable files
#-----------------------------------------------------------------------------

cp -p lout.exe $BPATH
cp -p prg2lout.exe $BPATH
echo copied executables across...

#-----------------------------------------------------------------------------
# copies over the basic README, copyright files
#-----------------------------------------------------------------------------

cp -p READMEPDF $CONTRIBPATH
cp -p blurb $CONTRIBPATH
cp -p blurb.short $CONTRIBPATH
cp -p gnu.gpl $CONTRIBPATH
cp -p maillist $CONTRIBPATH
cp -p notes_dsc $CONTRIBPATH
cp -p readme $CONTRIBPATH
cp -p whatsnew $CONTRIBPATH
cp -p djgpp/README.dj $CONTRIBPATH
cp -p man/lout.txt $CONTRIBPATH
cp -p man/prg2lout.txt $CONTRIBPATH
echo copied files to contrib directory...

#-----------------------------------------------------------------------------
# copies over the manual pages
#-----------------------------------------------------------------------------

cp -p man/lout.1 $CATPATH
cp -p man/prg2lout.1 $CATPATH
echo copied manual pages...

#-----------------------------------------------------------------------------
# copies over the executable files
#-----------------------------------------------------------------------------

cp -p $LIBINCLUDE/* $LOUTLIBPATH/$LIBINCLUDE
echo copied library: include files...

rm -f $LIBDATA/*.li
cp -p $LIBDATA/* $LOUTLIBPATH/$LIBDATA
echo copied library: data files...

rm -f $LIBHYPH/*.lp
cp -p $LIBHYPH/* $LOUTLIBPATH/$LIBHYPH
echo copied library: hyphenation files...

cp -p $LIBFONT/* $LOUTLIBPATH/$LIBFONT
echo copied library: font files...

cp -p $LIBMAPS/* $LOUTLIBPATH/$LIBMAPS
echo copied library: map files...

#cp -p $LIBLOCALE/* $LOUTLIBPATH/$LIBLOCALE
#echo copied library: locale files...

#-----------------------------------------------------------------------------
# write the manifest files
#-----------------------------------------------------------------------------

cat > $MFTPATH/$BNAME.ver <<HERE
$BNAME  $DESC
HERE

cat > $MFTPATH/$BNAME.mft <<HERE
$B/lout.exe
$B/prg2lout.exe
$MAN/$CAT/lout.1
$MAN/$CAT/prg2lout.1
$C/$LOUTVER/READMEPDF
$C/$LOUTVER/blurb
$C/$LOUTVER/blurb.short
$C/$LOUTVER/gnu.gpl
$C/$LOUTVER/maillist
$C/$LOUTVER/notes_dsc
$C/$LOUTVER/readme
$C/$LOUTVER/whatsnew
$C/$LOUTVER/README.dj
$C/$LOUTVER/lout.txt
$C/$LOUTVER/prg2lout.txt
$L/$LOUT/data/fcvt
$L/$LOUT/data/fcvt.awk
$L/$LOUT/data/fontdefs.ld
$L/$LOUT/data/latin2.ld
$L/$LOUT/data/loutrefs.ld
$L/$LOUT/data/oldrefs.ld
$L/$LOUT/data/readme
$L/$LOUT/data/refstyle.ld
$L/$LOUT/data/standard.ld
$L/$LOUT/font/00readme
$L/$LOUT/font/AGBd
$L/$LOUT/font/AGBdX
$L/$LOUT/font/AGBdO
$L/$LOUT/font/AGBdOX
$L/$LOUT/font/AGBk
$L/$LOUT/font/AGBkX
$L/$LOUT/font/AGBkO
$L/$LOUT/font/AGBkOX
$L/$LOUT/font/AGCnBd
$L/$LOUT/font/AGCnBdX
$L/$LOUT/font/AGCnBk
$L/$LOUT/font/AGCnBkX
$L/$LOUT/font/AGCnDm
$L/$LOUT/font/AGCnDmX
$L/$LOUT/font/AGCnMd
$L/$LOUT/font/AGCnMdX
$L/$LOUT/font/AGDm
$L/$LOUT/font/AGDmX
$L/$LOUT/font/AGDmO
$L/$LOUT/font/AGDmOX
$L/$LOUT/font/AGExLt
$L/$LOUT/font/AGExLtX
$L/$LOUT/font/AGExLtO
$L/$LOUT/font/AGExLtOX
$L/$LOUT/font/AGMd
$L/$LOUT/font/AGMdX
$L/$LOUT/font/AGMdO
$L/$LOUT/font/AGMdOX
$L/$LOUT/font/BkBd
$L/$LOUT/font/BkBdX
$L/$LOUT/font/BkBdIt
$L/$LOUT/font/BkBdItX
$L/$LOUT/font/BkDm
$L/$LOUT/font/BkDmX
$L/$LOUT/font/BkDmIt
$L/$LOUT/font/BkDmItX
$L/$LOUT/font/BkLt
$L/$LOUT/font/BkLtX
$L/$LOUT/font/BkLtIt
$L/$LOUT/font/BkLtItX
$L/$LOUT/font/BkMd
$L/$LOUT/font/BkMdX
$L/$LOUT/font/BkMdIt
$L/$LOUT/font/BkMdItX
$L/$LOUT/font/Cr
$L/$LOUT/font/CrX
$L/$LOUT/font/CrBd
$L/$LOUT/font/CrBdX
$L/$LOUT/font/CrBdO
$L/$LOUT/font/CrBdOX
$L/$LOUT/font/CrO
$L/$LOUT/font/CrOX
$L/$LOUT/font/He
$L/$LOUT/font/HeX
$L/$LOUT/font/HeBd
$L/$LOUT/font/HeBdX
$L/$LOUT/font/HeBdO
$L/$LOUT/font/HeBdOX
$L/$LOUT/font/HeBl
$L/$LOUT/font/HeBlX
$L/$LOUT/font/HeBlO
$L/$LOUT/font/HeBlOX
$L/$LOUT/font/HeCm
$L/$LOUT/font/HeCmX
$L/$LOUT/font/HeCn
$L/$LOUT/font/HeCnX
$L/$LOUT/font/HeCnBd
$L/$LOUT/font/HeCnBdX
$L/$LOUT/font/HeCnBdO
$L/$LOUT/font/HeCnBdOX
$L/$LOUT/font/HeCnBl
$L/$LOUT/font/HeCnBlX
$L/$LOUT/font/HeCnBlO
$L/$LOUT/font/HeCnBlOX
$L/$LOUT/font/HeCnLi
$L/$LOUT/font/HeCnLiX
$L/$LOUT/font/HeCnLiO
$L/$LOUT/font/HeCnLiOX
$L/$LOUT/font/HeCnO
$L/$LOUT/font/HeCnOX
$L/$LOUT/font/HeExtC
$L/$LOUT/font/HeExtCX
$L/$LOUT/font/HeLt
$L/$LOUT/font/HeLtX
$L/$LOUT/font/HeLtO
$L/$LOUT/font/HeLtOX
$L/$LOUT/font/HeNr
$L/$LOUT/font/HeNrX
$L/$LOUT/font/HeNrBd
$L/$LOUT/font/HeNrBdX
$L/$LOUT/font/HeNrBdO
$L/$LOUT/font/HeNrBdOX
$L/$LOUT/font/HeNrO
$L/$LOUT/font/HeNrOX
$L/$LOUT/font/HeO
$L/$LOUT/font/HeOX
$L/$LOUT/font/HeUlCm
$L/$LOUT/font/HeUlCmX
$L/$LOUT/font/NCSBd
$L/$LOUT/font/NCSBdX
$L/$LOUT/font/NCSBdIt
$L/$LOUT/font/NCSBdItX
$L/$LOUT/font/NCSIt
$L/$LOUT/font/NCSItX
$L/$LOUT/font/NCSRm
$L/$LOUT/font/NCSRmX
$L/$LOUT/font/PaBd
$L/$LOUT/font/PaBdX
$L/$LOUT/font/PaBdF
$L/$LOUT/font/PaBdFX
$L/$LOUT/font/PaBdIt
$L/$LOUT/font/PaBdItX
$L/$LOUT/font/PaBdItF
$L/$LOUT/font/PaBdItFX
$L/$LOUT/font/PaIt
$L/$LOUT/font/PaItX
$L/$LOUT/font/PaItF
$L/$LOUT/font/PaItFX
$L/$LOUT/font/PaRm
$L/$LOUT/font/PaRmX
$L/$LOUT/font/PaSC
$L/$LOUT/font/PaSCX
$L/$LOUT/font/Symbol
$L/$LOUT/font/TiBd
$L/$LOUT/font/TiBdX
$L/$LOUT/font/TiBdIt
$L/$LOUT/font/TiBdItX
$L/$LOUT/font/TiBdItF
$L/$LOUT/font/TiBdItFX
$L/$LOUT/font/TiBdSC
$L/$LOUT/font/TiBdSCX
$L/$LOUT/font/TiExBd
$L/$LOUT/font/TiExBdX
$L/$LOUT/font/TiIt
$L/$LOUT/font/TiItX
$L/$LOUT/font/TiItF
$L/$LOUT/font/TiItFX
$L/$LOUT/font/TiRm
$L/$LOUT/font/TiRmX
$L/$LOUT/font/TiRmSC
$L/$LOUT/font/TiRmSCX
$L/$LOUT/font/TiSm
$L/$LOUT/font/TiSmX
$L/$LOUT/font/TiSmIt
$L/$LOUT/font/TiSmItX
$L/$LOUT/font/ZCBd
$L/$LOUT/font/ZCBdX
$L/$LOUT/font/ZCDm
$L/$LOUT/font/ZCDmX
$L/$LOUT/font/ZCIt
$L/$LOUT/font/ZCItX
$L/$LOUT/font/ZCLt
$L/$LOUT/font/ZCLtX
$L/$LOUT/font/ZCLtIt
$L/$LOUT/font/ZCLtItX
$L/$LOUT/font/ZCMdIt
$L/$LOUT/font/ZCMdItX
$L/$LOUT/font/ZCRm
$L/$LOUT/font/ZCRmX
$L/$LOUT/font/zd
$L/$LOUT/hyph/croatian.lh
$L/$LOUT/hyph/czech.lh
$L/$LOUT/hyph/danish.lh
$L/$LOUT/hyph/dutch.lh
$L/$LOUT/hyph/english.lh
$L/$LOUT/hyph/engluk.lh
$L/$LOUT/hyph/finnish.lh
$L/$LOUT/hyph/french.lh
$L/$LOUT/hyph/german.lh
$L/$LOUT/hyph/italian.lh
$L/$LOUT/hyph/magyar.lh
$L/$LOUT/hyph/norweg.lh
$L/$LOUT/hyph/polish.lh
$L/$LOUT/hyph/portugal.lh
$L/$LOUT/hyph/readme
$L/$LOUT/hyph/russian.lh
$L/$LOUT/hyph/slovak.lh
$L/$LOUT/hyph/slovenia.lh
$L/$LOUT/hyph/spanish.lh
$L/$LOUT/hyph/swedish.lh
$L/$LOUT/hyph/usorbian.lh
$L/$LOUT/include/blue
$L/$LOUT/include/bluef
$L/$LOUT/include/book
$L/$LOUT/include/bookf
$L/$LOUT/include/bsf
$L/$LOUT/include/bsf.lpg
$L/$LOUT/include/coltex
$L/$LOUT/include/cprint
$L/$LOUT/include/cprintf
$L/$LOUT/include/diag
$L/$LOUT/include/diagf
$L/$LOUT/include/diagf.etc
$L/$LOUT/include/diagf.lpg
$L/$LOUT/include/doc
$L/$LOUT/include/docf
$L/$LOUT/include/dsf
$L/$LOUT/include/eiffel
$L/$LOUT/include/eiffelf
$L/$LOUT/include/eq
$L/$LOUT/include/eqf
$L/$LOUT/include/fig
$L/$LOUT/include/figf
$L/$LOUT/include/figf.lpg
$L/$LOUT/include/graph
$L/$LOUT/include/graphf
$L/$LOUT/include/graphf.etc
$L/$LOUT/include/graphf.lpg
$L/$LOUT/include/init
$L/$LOUT/include/java
$L/$LOUT/include/javaf
$L/$LOUT/include/langdefs
$L/$LOUT/include/latin2
$L/$LOUT/include/lengths
$L/$LOUT/include/modula
$L/$LOUT/include/modulaf
$L/$LOUT/include/mydefs
$L/$LOUT/include/np
$L/$LOUT/include/npf
$L/$LOUT/include/pas
$L/$LOUT/include/pasf
$L/$LOUT/include/perl
$L/$LOUT/include/perlf
$L/$LOUT/include/picture
$L/$LOUT/include/picturef
$L/$LOUT/include/pie
$L/$LOUT/include/pief
$L/$LOUT/include/pief.lpg
$L/$LOUT/include/pod
$L/$LOUT/include/podf
$L/$LOUT/include/python
$L/$LOUT/include/pythonf
$L/$LOUT/include/readme
$L/$LOUT/include/report
$L/$LOUT/include/reportf
$L/$LOUT/include/ruby
$L/$LOUT/include/rubyf
$L/$LOUT/include/russian
$L/$LOUT/include/russian.fd
$L/$LOUT/include/save_bookf
$L/$LOUT/include/save_dsf
$L/$LOUT/include/slides
$L/$LOUT/include/slidesf
$L/$LOUT/include/tab
$L/$LOUT/include/tabf
$L/$LOUT/include/tabf.lpg
$L/$LOUT/include/tbl
$L/$LOUT/include/tblf
$L/$LOUT/include/ts
$L/$LOUT/include/xrgb
$L/$LOUT/maps/00readme
$L/$LOUT/maps/Ding.LCM
$L/$LOUT/maps/Latin1.LCM
$L/$LOUT/maps/LtKOI8.LCM
$L/$LOUT/maps/LtLatin1.LCM
$L/$LOUT/maps/LtLatin2.LCM
$L/$LOUT/maps/Std.LCM
$L/$LOUT/maps/Symb.LCM
$L/$LOUT/maps/koi8-r.lcm
$L/$LOUT/maps/koi8r.LCM
$L/$LOUT/maps/null.LCM
$M/$BNAME.ver
$M/$BNAME.mft
$M/$BNAME.dsm
HERE
#$L/$LOUT/locale/msgs_english_3.16
#$L/$LOUT/locale/old_msgs.de
#$L/$LOUT/locale/old_msgs.fr
#$L/$LOUT/locale/readme
echo manifest files created...

cat > $MFTPATH/$BNAME.dsm <<HERE
#
# DSM for Lout 3.28 binaries
#

dsm-file-version: 1.0
dsm-name: lout328b
dsm-version: 0.6.1

dsm-author: Kein-Hong Man
dsm-author-email: mkh@pl.jaring.my
dsm-author-web-site: http://www.geocities.com/keinhong/

name: lout
version: 3.28
type: binaries
manifest: lout328b
sources-dsm: lout328s
documentation-dsm: lout328d

license: GNU General Public License, Version 2
short-description: Basser Lout for DJGPP
long-description: Basser Lout typesetter for DJGPP with \
standard library files.

author: Jeffrey Kingston
author-email: jeff@it.usyd.edu.au

web-site: http://www.ptc.spbu.ru/~uwe/lout/lout.html
ftp-site: ftp://ftp.cs.usyd.edu.au/jeff/lout/

mailing-list: lout@ptc.spbu.ru
mailing-list-description: subscribers-only official Lout mailing list
mailing-list-request: lout-request@ptc.spbu.ru
mailing-list-web-site: http://www.ptc.spbu.ru/~uwe/lout/list.html

porter: Kein-Hong Man
porter-email: mkh@pl.jaring.my
porter-web-site: http://www.geocities.com/keinhong/

simtelnet-path: v2apps/
zip: lout328b.zip

requires: DPMI >= 0.9
replaces: lout < 3.28

pre-install-readme: contrib/lout-3.28/README.dj
HERE

#-----------------------------------------------------------------------------

echo $BNAME completed.
