mirror of
https://github.com/digarok/MiniMemoryTester.git
synced 2024-12-27 18:30:53 +00:00
83 lines
2.3 KiB
Bash
Executable File
83 lines
2.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# SET THESE TOOLS UP ON YOUR SYSTEM AND UPDATE THE PATHS HERE TO BUILD
|
|
CADIUS="../tools/Cadius"
|
|
MERLIN="../tools/Merlin32_v1.0/MacOSX/Merlin32"
|
|
|
|
# Here's our fancy build pipeline. Output = src/mtsystem (binary file)
|
|
$MERLIN -V . src/mmt.s
|
|
|
|
# whatever the build produces
|
|
OUTFILE="src/mmtsystem"
|
|
if [ ! -f $OUTFILE ]; then
|
|
echo "Can't find $OUTFILE. Check assembler output."
|
|
exit 1
|
|
fi
|
|
mv $OUTFILE src/mmt.system
|
|
|
|
SRCFILES=(`ls src/*.s`)
|
|
DOCFILES=(`ls docs/*.txt`)
|
|
SYSFILES=(`ls src/PRODOS src/*system`)
|
|
|
|
DISK="MMT" # base name of disk image
|
|
SRCDIR=src
|
|
BLDDIR=build/nix
|
|
|
|
if [ ! -d $BLDDIR ] ; then
|
|
echo "Build directory for this platform doesn't exist so I will create it."
|
|
mkdir -p $BLDDIR
|
|
echo "Created: $BLDDIR"
|
|
sleep 1
|
|
fi
|
|
|
|
# need to autogen
|
|
cp src/_FileInformation.txt $BLDDIR
|
|
|
|
$CADIUS createvolume ${DISK}800.2mg ${DISK}800 800KB >/dev/null
|
|
$CADIUS createvolume ${DISK}800.po ${DISK}800 800KB >/dev/null
|
|
$CADIUS createvolume ${DISK}140.po ${DISK}140 140KB >/dev/null
|
|
$CADIUS createfolder ${DISK}800.2mg /${DISK}800/src
|
|
$CADIUS createfolder ${DISK}800.po /${DISK}800/src
|
|
$CADIUS createfolder ${DISK}140.po /${DISK}140/src
|
|
$CADIUS createfolder ${DISK}800.2mg /${DISK}800/doc
|
|
$CADIUS createfolder ${DISK}800.po /${DISK}800/doc
|
|
$CADIUS createfolder ${DISK}140.po /${DISK}140/doc
|
|
|
|
#SOURCE FILES
|
|
for f in ${SRCFILES[@]};
|
|
do
|
|
FNAME=${f##*/}
|
|
echo Processing $FNAME
|
|
cp $f $BLDDIR/$FNAME
|
|
$CADIUS sethighbit $BLDDIR/$FNAME > /dev/null
|
|
# add -V to debug
|
|
$CADIUS addfile ${DISK}800.2mg /${DISK}800/src $BLDDIR/$FNAME >/dev/null
|
|
$CADIUS addfile ${DISK}800.po /${DISK}800/src $BLDDIR/$FNAME >/dev/null
|
|
$CADIUS addfile ${DISK}140.po /${DISK}140/src $BLDDIR/$FNAME >/dev/null
|
|
done
|
|
|
|
#DOC FILES
|
|
for f in ${DOCFILES[@]};
|
|
do
|
|
FNAME=${f##*/}
|
|
echo Processing $FNAME
|
|
cp $f $BLDDIR/$FNAME
|
|
# add -V to debug
|
|
$CADIUS addfile ${DISK}800.2mg /${DISK}800/doc $BLDDIR/$FNAME >/dev/null
|
|
$CADIUS addfile ${DISK}800.po /${DISK}800/doc $BLDDIR/$FNAME >/dev/null
|
|
$CADIUS addfile ${DISK}140.po /${DISK}140/doc $BLDDIR/$FNAME >/dev/null
|
|
done
|
|
|
|
#SYSTEM FILES
|
|
for f in ${SYSFILES[@]};
|
|
do
|
|
FNAME=${f##*/}
|
|
echo Processing $FNAME
|
|
cp $f $BLDDIR/$FNAME
|
|
$CADIUS addfile ${DISK}800.2mg /${DISK}800/ $BLDDIR/$FNAME >/dev/null
|
|
$CADIUS addfile ${DISK}800.po /${DISK}800/ $BLDDIR/$FNAME >/dev/null
|
|
$CADIUS addfile ${DISK}140.po /${DISK}140/ $BLDDIR/$FNAME >/dev/null
|
|
done
|
|
|
|
|