New ZIP package creation script and packages added
This commit is contained in:
46
Packages/README.md
Normal file
46
Packages/README.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# Packages
|
||||
|
||||
In this directory, I created ``.zip`` packages of all games for BBS distribution.
|
||||
|
||||
The files are created by using Info-ZIP ``zip`` on Linux.
|
||||
|
||||
## The .zip packages
|
||||
|
||||
All .zip packages are placed in the directory [ZIP](ZIP/).
|
||||
|
||||
The files can be extracted using the CP/M UNZIP command that can also be found here:
|
||||
|
||||
* [UNZIP154.COM](UNZIP154.COM) - CP/M binary
|
||||
* [UNZIP154.LBR](UNZIP154.LBR) - archive including source
|
||||
|
||||
The Github repository for this UNZIP can be found here: https://github.com/agn453/UNZIP-CPM-Z80
|
||||
|
||||
## Package creation
|
||||
|
||||
I've created scripts to automatically create the .zip archives as well as the HDimage.
|
||||
For this to work, in every game directory, a file called ``.package`` is created which controls
|
||||
the package creation process.
|
||||
|
||||
``.package`` is a semicolon separated file.
|
||||
|
||||
The first value contains a letter which indicates:
|
||||
|
||||
| N | name of the package (for .zip creation) |
|
||||
| F | file (binary or game data) |
|
||||
| S | source file (won't be put into HDimage) |
|
||||
| R | README file, will be renamed <packagename>.DOC |
|
||||
| D | description, will be put into ``FILE_ID.DIZ`` |
|
||||
|
||||
The second value contains the value for the kind of line.
|
||||
|
||||
Optionally, a third value can exist for ``F``, ``S`` and ``R`` lines which defines a target filename,
|
||||
eg. if the original filename does not conform to the ``8.3`` format. The file will be put in the archive
|
||||
under this new filename.
|
||||
For example:
|
||||
|
||||
S;gpl-3.0.txt;GPL3.TXT
|
||||
|
||||
will put the file ``gpl-3.0.txt`` as ``GPL3.TXT`` in the .zip file, but not in the HDimage (as
|
||||
source files will only be put in the .zip archives).
|
||||
|
||||
|
BIN
Packages/UNZIP154.COM
Normal file
BIN
Packages/UNZIP154.COM
Normal file
Binary file not shown.
BIN
Packages/UNZIP154.LBR
Normal file
BIN
Packages/UNZIP154.LBR
Normal file
Binary file not shown.
BIN
Packages/ZIP/2048.ZIP
Normal file
BIN
Packages/ZIP/2048.ZIP
Normal file
Binary file not shown.
BIN
Packages/ZIP/BATTLSHP.ZIP
Normal file
BIN
Packages/ZIP/BATTLSHP.ZIP
Normal file
Binary file not shown.
BIN
Packages/ZIP/BLOCKS.ZIP
Normal file
BIN
Packages/ZIP/BLOCKS.ZIP
Normal file
Binary file not shown.
BIN
Packages/ZIP/CATCHUM.ZIP
Normal file
BIN
Packages/ZIP/CATCHUM.ZIP
Normal file
Binary file not shown.
BIN
Packages/ZIP/CHASE.ZIP
Normal file
BIN
Packages/ZIP/CHASE.ZIP
Normal file
Binary file not shown.
BIN
Packages/ZIP/CPMTRIS.ZIP
Normal file
BIN
Packages/ZIP/CPMTRIS.ZIP
Normal file
Binary file not shown.
BIN
Packages/ZIP/FTM.ZIP
Normal file
BIN
Packages/ZIP/FTM.ZIP
Normal file
Binary file not shown.
BIN
Packages/ZIP/GAMMON.ZIP
Normal file
BIN
Packages/ZIP/GAMMON.ZIP
Normal file
Binary file not shown.
BIN
Packages/ZIP/LADDER.ZIP
Normal file
BIN
Packages/ZIP/LADDER.ZIP
Normal file
Binary file not shown.
BIN
Packages/ZIP/MAZEZAM.ZIP
Normal file
BIN
Packages/ZIP/MAZEZAM.ZIP
Normal file
Binary file not shown.
BIN
Packages/ZIP/PAC.ZIP
Normal file
BIN
Packages/ZIP/PAC.ZIP
Normal file
Binary file not shown.
BIN
Packages/ZIP/QUATRIS.ZIP
Normal file
BIN
Packages/ZIP/QUATRIS.ZIP
Normal file
Binary file not shown.
BIN
Packages/ZIP/ROBOTS.ZIP
Normal file
BIN
Packages/ZIP/ROBOTS.ZIP
Normal file
Binary file not shown.
BIN
Packages/ZIP/ROGUE.ZIP
Normal file
BIN
Packages/ZIP/ROGUE.ZIP
Normal file
Binary file not shown.
BIN
Packages/ZIP/SNAKE.ZIP
Normal file
BIN
Packages/ZIP/SNAKE.ZIP
Normal file
Binary file not shown.
BIN
Packages/ZIP/SOKOBAN.ZIP
Normal file
BIN
Packages/ZIP/SOKOBAN.ZIP
Normal file
Binary file not shown.
BIN
Packages/ZIP/TPLADDER.ZIP
Normal file
BIN
Packages/ZIP/TPLADDER.ZIP
Normal file
Binary file not shown.
BIN
Packages/ZIP/WANDERER.ZIP
Normal file
BIN
Packages/ZIP/WANDERER.ZIP
Normal file
Binary file not shown.
BIN
Packages/ZIP/WORM.ZIP
Normal file
BIN
Packages/ZIP/WORM.ZIP
Normal file
Binary file not shown.
49
Packages/makepackages.sh
Executable file
49
Packages/makepackages.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
|
||||
# where to store the packages
|
||||
TARGET=${PWD}/ZIP
|
||||
[ ! -d ${TARGET} ] && mkdir ${TARGET}
|
||||
|
||||
# get list of directories with .package files
|
||||
DIRS=""
|
||||
cd ..
|
||||
for i in $(find . -name ".package"); do
|
||||
DIRS="${DIRS} $(dirname $i)"
|
||||
done
|
||||
|
||||
for pkg in ${DIRS}; do
|
||||
echo "----- ${pkg}"
|
||||
TMPDIR=$(mktemp -d)
|
||||
NAME=""
|
||||
|
||||
while read LINE; do
|
||||
IFS=';' read -ra DATA <<< ${LINE}
|
||||
|
||||
# the name of the target .zip archive:
|
||||
[ "${DATA[0]}" = "N" ] && NAME=${DATA[1]}
|
||||
|
||||
# standard/source files:
|
||||
if [ "${DATA[0]}" = "F" -o "${DATA[0]}" = "S" ]; then
|
||||
if [ "${DATA[2]}" = "" ]; then
|
||||
cp ${pkg}/${DATA[1]} ${TMPDIR}/${DATA[1]^^}
|
||||
else
|
||||
cp ${pkg}/${DATA[1]} ${TMPDIR}/${DATA[2]}
|
||||
fi
|
||||
fi
|
||||
|
||||
# README file:
|
||||
if [ "${DATA[0]}" = "R" ]; then
|
||||
if [ "${DATA[2]}" = "" ]; then
|
||||
pandoc -f markdown -t plain -s ${pkg}/${DATA[1]} -o ${TMPDIR}/${NAME}.DOC
|
||||
else
|
||||
pandoc -f markdown -t plain -s ${pkg}/${DATA[1]} -o ${TMPDIR}/${DATA[2]}
|
||||
fi
|
||||
fi
|
||||
|
||||
# FILE_ID.DIZ contents:
|
||||
[ "${DATA[0]}" = "D" ] && echo "${DATA[1]}" >> ${TMPDIR}/FILE_ID.DIZ
|
||||
done < ${pkg}/.package
|
||||
|
||||
zip -k -j ${TARGET}/${NAME}.ZIP ${TMPDIR}/*
|
||||
rm -R ${TMPDIR}
|
||||
done
|
Reference in New Issue
Block a user