-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.sh
executable file
·56 lines (44 loc) · 977 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh
runcpm=`pwd`/runcpm/RunCPM/RunCPM
platform=$1
echo $platform
# Build RunCPM
cd runcpm/RunCPM
make $platform build
cd ../..
# Build ctools
cd ctools/src
make -f makefile.unx install
cd ../..
# Create build environment
rm -rf buildenv
mkdir buildenv
cd buildenv
# RunCPM
cp ../runcpm/RunCPM/RunCPM .
cp ../runcpm/CCP/CCP-*.* .
# Disk A user 0
mkdir -p A/0
cd A/0
# Copy tools from A.ZIP
unzip ../../../runcpm/DISK/A.ZIP
cp -v ../../../cpm/* .
# Upper case file names
for i in *; do mv -f "$i" "$(echo $i|tr a-z A-Z)" >/dev/null 2>&1; done
cd ../..
# Build CPM+.SYS
$runcpm <<EOF
submit cz
exit
EOF
cd A/0
dd bs=1 if=KEYCODE.BIN of=CPM+.SYS skip=0 seek=256 count=1024 conv=notrunc
rm *.ASM
cd ../../..
# Build disk image
DISTRIBUTION=releases/cpmfast
rm cpm+128.d71
ctools/bin/cformat -2 cpm+128.d71
ctools/bin/ctools cpm+128.d71 p buildenv/A/0/CPM+.SYS
for i in $DISTRIBUTION/*.*; do ctools/bin/ctools cpm+128.d71 p $i; done
ctools/bin/ctools cpm+128.d71 d