Subversion Repositories SvarDOS

Rev

Rev 791 | Rev 838 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 791 Rev 836
1
#!/bin/bash
1
#!/bin/bash
2
#
2
#
3
# SvarDOS build script
3
# SvarDOS build script
4
# http://svardos.org
4
# http://svardos.org
5
# Copyright (C) 2016-2022 Mateusz Viste
5
# Copyright (C) 2016-2022 Mateusz Viste
6
#
6
#
7
# This script generates the SvarDOS repository index and builds floppy and CD
7
# This script generates the SvarDOS repository index and builds floppy and CD
8
# images. It should be executed each time that a CORE package has been
8
# images. It should be executed each time that a CORE package has been
9
# modified, added or removed.
9
# modified, added or removed.
10
#
10
#
11
# usage: ./build.sh [noclean]
11
# usage: ./build.sh outputdir [noclean]
12
#
12
#
13
 
13
 
14
### parameters block starts here ############################################
14
### parameters block starts here ############################################
15
 
15
 
16
CURDATE=`date +%Y%m%d`
16
CURDATE=`date +%Y%m%d`
17
REPOROOT=`realpath ./packages`
17
REPOROOT=`realpath ./packages`
18
PUBDIR=`realpath ./website/download`/$CURDATE
-
 
19
CDROOT=`realpath ./tmp_cdroot.build`
-
 
20
FLOPROOT=`realpath ./tmp_floproot.build`
-
 
21
CUSTFILES=`realpath ./files`
18
CUSTFILES=`realpath ./files`
22
 
19
 
23
GENISOIMAGE=''    # can be mkisofs, genisoimage or empty for autodetection
20
GENISOIMAGE=''    # can be mkisofs, genisoimage or empty for autodetection
24
 
21
 
25
### parameters block ends here ##############################################
22
### parameters block ends here ##############################################
26
 
23
 
-
 
24
# look for mandatory output dir
-
 
25
if [ "x$1" == "x" ] ; then
-
 
26
  echo "usage: build.sh outputdir [noclean] > logfile"
-
 
27
  exit 1
-
 
28
fi
-
 
29
PUBDIR=`realpath "$1"`/$CURDATE.staging
-
 
30
 
-
 
31
CDROOT="$PUBDIR/tmp_cdroot.build"
-
 
32
FLOPROOT="$PUBDIR/tmp_floproot.build"
-
 
33
 
-
 
34
 
27
# auto-detect whether to use mkisofs or genisoimage
35
# auto-detect whether to use mkisofs or genisoimage
28
 
36
 
29
if [ "x$GENISOIMAGE" == "x" ] ; then
37
if [ "x$GENISOIMAGE" == "x" ] ; then
30
mkisofs --help 2> /dev/null
38
mkisofs --help 2> /dev/null
31
if [ $? -eq 0 ] ; then
39
if [ $? -eq 0 ] ; then
32
  GENISOIMAGE='mkisofs'
40
  GENISOIMAGE='mkisofs'
33
fi
41
fi
34
fi
42
fi
35
 
43
 
36
if [ "x$GENISOIMAGE" == "x" ] ; then
44
if [ "x$GENISOIMAGE" == "x" ] ; then
37
genisoimage --help 2> /dev/null
45
genisoimage --help 2> /dev/null
38
if [ $? -eq 0 ] ; then
46
if [ $? -eq 0 ] ; then
39
  GENISOIMAGE='genisoimage'
47
  GENISOIMAGE='genisoimage'
40
fi
48
fi
41
fi
49
fi
42
 
50
 
43
if [ "x$GENISOIMAGE" == "x" ] ; then
51
if [ "x$GENISOIMAGE" == "x" ] ; then
44
  echo "ERROR: neither genisoimage nor mkisofs was found on this system"
52
  echo "ERROR: neither genisoimage nor mkisofs was found on this system"
45
  exit 1
53
  exit 1
46
fi
54
fi
47
 
55
 
48
 
56
 
49
# abort if anything fails
57
# abort if anything fails
50
set -e
58
set -e
51
 
59
 
52
 
60
 
53
# list of packages to be part of CORE (always installed)
61
# list of packages to be part of CORE (always installed)
54
COREPKGS=`ls -1 'packages/core' | grep -o '^[a-z]*'`
62
COREPKGS=`ls -1 'packages/core' | grep -o '^[a-z]*'`
55
 
63
 
56
# list of packages to be part of EXTRA (only sometimes installed, typically drivers)
64
# list of packages to be part of EXTRA (only sometimes installed, typically drivers)
57
EXTRAPKGS="pcntpk udvd2"
65
EXTRAPKGS="pcntpk udvd2"
58
 
66
 
59
# all packages
67
# all packages
60
ALLPKGS="$COREPKGS $EXTRAPKGS"
68
ALLPKGS="$COREPKGS $EXTRAPKGS"
61
 
69
 
62
 
70
 
63
# prepares image for floppy sets of:
71
# prepares image for floppy sets of:
64
# $1 cylinders
72
# $1 cylinders
65
# $2 heads (sides)
73
# $2 heads (sides)
66
# $3 sectors per track
74
# $3 sectors per track
67
# $4 size
75
# $4 size
68
# $5 where to put a copy of the image (optional)
76
# $5 where to put a copy of the image (optional)
69
function prep_flop {
77
function prep_flop {
70
  mkdir $4
78
  mkdir $4
71
  mformat -C -t $1 -h $2 -s $3 -v SVARDOS -B "$CUSTFILES/floppy.mbr" -i "$4/disk1.img"
79
  mformat -C -t $1 -h $2 -s $3 -v SVARDOS -B "$CUSTFILES/floppy.mbr" -i "$4/disk1.img"
72
  mcopy -sQm -i "$4/disk1.img" "$FLOPROOT/"* ::/
80
  mcopy -sQm -i "$4/disk1.img" "$FLOPROOT/"* ::/
73
 
81
 
74
  # now populate the floppies
82
  # now populate the floppies
75
  curdisk=1
83
  curdisk=1
76
  for p in $ALLPKGS ; do
84
  for p in $ALLPKGS ; do
77
    # if copy fails, then probably the floppy is full - try again after
85
    # if copy fails, then probably the floppy is full - try again after
78
    # creating an additional floppy image
86
    # creating an additional floppy image
79
    if ! mcopy -mi "$4/disk$curdisk.img" "$CDROOT/$p.svp" ::/ ; then
87
    if ! mcopy -mi "$4/disk$curdisk.img" "$CDROOT/$p.svp" ::/ ; then
80
      curdisk=$((curdisk+1))
88
      curdisk=$((curdisk+1))
81
      mformat -C -t $1 -h $2 -s $3 -v SVARDOS -i "$4/disk$curdisk.img"
89
      mformat -C -t $1 -h $2 -s $3 -v SVARDOS -i "$4/disk$curdisk.img"
82
      mcopy -mi "$4/disk$curdisk.img" "$CDROOT/$p.svp" ::/
90
      mcopy -mi "$4/disk$curdisk.img" "$CDROOT/$p.svp" ::/
83
    fi
91
    fi
84
  done
92
  done
85
 
93
 
86
  # add a short readme
94
  # add a short readme
87
  echo "This directory contains a set of $curdisk floppy images of the SvarDOS distribution in the $4 KB floppy format." > "$4/readme.txt"
95
  echo "This directory contains a set of $curdisk floppy images of the SvarDOS distribution in the $4 KB floppy format." > "$4/readme.txt"
88
  echo "" >> "$4/readme.txt"
96
  echo "" >> "$4/readme.txt"
89
  echo "These images are raw floppy disk dumps. To write them on an actual floppy disk, you have to use a low-level sector copying tool, like dd." >> "$4/readme.txt"
97
  echo "These images are raw floppy disk dumps. To write them on an actual floppy disk, you have to use a low-level sector copying tool, like dd." >> "$4/readme.txt"
90
  echo "" >> "$4/readme.txt"
98
  echo "" >> "$4/readme.txt"
91
  echo "Latest SvarDOS version is available on the project's homepage: http://svardos.osdn.io" >> "$4/readme.txt"
99
  echo "Latest SvarDOS version is available on the project's homepage: http://svardos.osdn.io" >> "$4/readme.txt"
92
 
100
 
93
  unix2dos "$4/readme.txt"
101
  unix2dos "$4/readme.txt"
94
 
102
 
95
  # make a copy of the image, if requested
103
  # make a copy of the image, if requested
96
  if [ "x$5" != "x" ] ; then
104
  if [ "x$5" != "x" ] ; then
97
    cp "$4/disk1.img" $5
105
    cp "$4/disk1.img" $5
98
  fi
106
  fi
99
 
107
 
100
  # zip the images (and remove them at the same time)
108
  # zip the images (and remove them at the same time)
101
  rm -f "$PUBDIR/svardos-floppy-$4k.zip"
109
  rm -f "$PUBDIR/svardos-floppy-$4k.zip"
102
  zip -9 -rmj "$PUBDIR/svardos-$CURDATE-floppy-$4k.zip" $4/*
110
  zip -9 -rmj "$PUBDIR/svardos-$CURDATE-floppy-$4k.zip" $4/*
103
 
111
 
104
  # clean up
112
  # clean up
105
  rmdir $4
113
  rmdir $4
106
}
114
}
107
 
115
 
108
 
116
 
109
### actual code flow starts here ############################################
117
### actual code flow starts here ############################################
110
 
118
 
111
# remember where I am, so I can get back here once all is done
119
# remember where I am, so I can get back here once all is done
112
origdir=`pwd`
120
origdir=`pwd`
113
 
121
 
-
 
122
echo "###############################################################################"
-
 
123
echo " STARTING BUILD $CURDATE"
-
 
124
echo "###############################################################################"
-
 
125
echo "dest dir: $PUBDIR"
-
 
126
echo "current time is `date` and it's a beautiful day somewhere in the world"
-
 
127
echo
-
 
128
 
-
 
129
mkdir "$PUBDIR"
114
mkdir "$CDROOT"
130
mkdir "$CDROOT"
115
mkdir "$FLOPROOT"
131
mkdir "$FLOPROOT"
116
mkdir "$PUBDIR"
-
 
117
 
132
 
118
# add CORE packages to CDROOT + create the list of packages on floppy
133
# add CORE packages to CDROOT + create the list of packages on floppy
119
for pkg in $COREPKGS ; do
134
for pkg in $COREPKGS ; do
120
  cp "$REPOROOT/core/$pkg.svp" "$CDROOT/"
135
  cp "$REPOROOT/core/$pkg.svp" "$CDROOT/"
121
  echo "$pkg" >> "$FLOPROOT/install.lst"
136
  echo "$pkg" >> "$FLOPROOT/install.lst"
122
done
137
done
123
 
138
 
124
# add EXTRA packages to CDROOT (but not in the list of packages to install)
139
# add EXTRA packages to CDROOT (but not in the list of packages to install)
125
for pkg in $EXTRAPKGS ; do
140
for pkg in $EXTRAPKGS ; do
126
  cp "$REPOROOT/$pkg.svp" "$CDROOT/"
141
  cp "$REPOROOT/$pkg.svp" "$CDROOT/"
127
done
142
done
128
 
143
 
129
 
144
 
-
 
145
echo
-
 
146
echo "### Populating the floppy root at $FLOPROOT"
-
 
147
echo
-
 
148
 
130
# prepare the content of the boot (install) floppy
149
# prepare the content of the boot (install) floppy
131
cp -r "$CUSTFILES/floppy/"* "$FLOPROOT/"
150
cp -r "$CUSTFILES/floppy/"* "$FLOPROOT/"
132
unzip -Cj "$REPOROOT/core/cpidos.svp" 'cpi/ega*.cpx' -d "$FLOPROOT/"
151
unzip -Cj "$REPOROOT/core/cpidos.svp" 'cpi/ega*.cpx' -d "$FLOPROOT/"
133
unzip -Cj "$REPOROOT/core/command.svp" bin/command.com -d "$FLOPROOT/"
152
unzip -Cj "$REPOROOT/core/command.svp" bin/command.com -d "$FLOPROOT/"
134
unzip -Cj "$REPOROOT/core/display.svp" bin/display.exe -d "$FLOPROOT/"
153
unzip -Cj "$REPOROOT/core/display.svp" bin/display.exe -d "$FLOPROOT/"
135
unzip -Cj "$REPOROOT/core/edit.svp" bin/edit.exe -d "$FLOPROOT/"
154
unzip -Cj "$REPOROOT/core/edit.svp" bin/edit.exe -d "$FLOPROOT/"
136
unzip -Cj "$REPOROOT/core/fdapm.svp" bin/fdapm.com -d "$FLOPROOT/"
155
unzip -Cj "$REPOROOT/core/fdapm.svp" bin/fdapm.com -d "$FLOPROOT/"
137
unzip -Cj "$REPOROOT/core/fdisk.svp" bin/fdisk.exe bin/fdiskpt.ini -d "$FLOPROOT/"
156
unzip -Cj "$REPOROOT/core/fdisk.svp" bin/fdisk.exe bin/fdiskpt.ini -d "$FLOPROOT/"
138
unzip -Cj "$REPOROOT/core/format.svp" bin/format.exe -d "$FLOPROOT/"
157
unzip -Cj "$REPOROOT/core/format.svp" bin/format.exe -d "$FLOPROOT/"
139
unzip -Cj "$REPOROOT/core/kernel.svp" bin/kernel.sys bin/sys.com -d "$FLOPROOT/"
158
unzip -Cj "$REPOROOT/core/kernel.svp" bin/kernel.sys bin/sys.com -d "$FLOPROOT/"
140
unzip -Cj "$REPOROOT/core/mem.svp" bin/mem.exe -d "$FLOPROOT/"
159
unzip -Cj "$REPOROOT/core/mem.svp" bin/mem.exe -d "$FLOPROOT/"
141
unzip -Cj "$REPOROOT/core/mode.svp" bin/mode.com -d "$FLOPROOT/"
160
unzip -Cj "$REPOROOT/core/mode.svp" bin/mode.com -d "$FLOPROOT/"
142
unzip -Cj "$REPOROOT/core/more.svp" bin/more.exe -d "$FLOPROOT/"
161
unzip -Cj "$REPOROOT/core/more.svp" bin/more.exe -d "$FLOPROOT/"
143
unzip -Cj "$REPOROOT/core/pkg.svp" bin/pkg.exe -d "$FLOPROOT/"
162
unzip -Cj "$REPOROOT/core/pkg.svp" bin/pkg.exe -d "$FLOPROOT/"
144
 
163
 
-
 
164
echo
-
 
165
echo "### Creating floppy images"
-
 
166
echo
-
 
167
 
145
# build the boot (CD) floppy image
168
# build the boot (CD) floppy image
146
export MTOOLS_NO_VFAT=1
169
export MTOOLS_NO_VFAT=1
147
#mformat -C -f 2880 -v SVARDOS -B "$CUSTFILES/floppy.mbr" -i "$CDROOT/boot.img"
170
#mformat -C -f 2880 -v SVARDOS -B "$CUSTFILES/floppy.mbr" -i "$CDROOT/boot.img"
148
#mcopy -sQm -i "$CDROOT/boot.img" "$FLOPROOT/"* ::/
171
#mcopy -sQm -i "$CDROOT/boot.img" "$FLOPROOT/"* ::/
149
 
172
 
150
# prepare images for floppies in different sizes (args are C H S SIZE)
173
# prepare images for floppies in different sizes (args are C H S SIZE)
151
prep_flop 80 2 36 2880 "$CDROOT/boot.img"
174
prep_flop 80 2 36 2880 "$CDROOT/boot.img"
152
prep_flop 80 2 18 1440
175
prep_flop 80 2 18 1440
153
prep_flop 80 2 15 1200
176
prep_flop 80 2 15 1200
154
prep_flop 80 2  9  720
177
prep_flop 80 2  9  720
155
#prep_flop 96 64 32 98304 "$PUBDIR/svardos-zip100.img" # ZIP 100M (for USB boot in "USB-ZIP mode")
178
#prep_flop 96 64 32 98304 "$PUBDIR/svardos-zip100.img" # ZIP 100M (for USB boot in "USB-ZIP mode")
156
 
179
 
-
 
180
echo
-
 
181
echo "### Computing DOSEMU.zip"
-
 
182
echo
-
 
183
 
157
# prepare the DOSEMU boot zip
184
# prepare the DOSEMU boot zip
158
DOSEMUDIR='tmp_dosemu-prep-files.build'
185
DOSEMUDIR="$PUBDIR/tmp_dosemu-prep-files.build"
159
mkdir "$DOSEMUDIR"
186
mkdir "$DOSEMUDIR"
160
# INSTALL.BAT
187
# INSTALL.BAT
161
echo 'IF NOT EXIST C:\TEMP\NUL MKDIR C:\TEMP' >> "$DOSEMUDIR/install.bat"
188
echo 'IF NOT EXIST C:\TEMP\NUL MKDIR C:\TEMP' >> "$DOSEMUDIR/install.bat"
162
echo 'mkdir %DOSDIR%' >> "$DOSEMUDIR/install.bat"
189
echo 'mkdir %DOSDIR%' >> "$DOSEMUDIR/install.bat"
163
echo 'mkdir %DOSDIR%\cfg' >> "$DOSEMUDIR/install.bat"
190
echo 'mkdir %DOSDIR%\cfg' >> "$DOSEMUDIR/install.bat"
164
echo 'ECHO # pkg config file - specifies locations where packages should be installed >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
191
echo 'ECHO # pkg config file - specifies locations where packages should be installed >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
165
echo 'ECHO DIR PROGS C:\ >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
192
echo 'ECHO DIR PROGS C:\ >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
166
echo 'ECHO DIR GAMES C:\ >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
193
echo 'ECHO DIR GAMES C:\ >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
167
echo 'ECHO DIR DRIVERS C:\DRIVERS\ >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
194
echo 'ECHO DIR DRIVERS C:\DRIVERS\ >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
168
echo 'ECHO DIR DEVEL C:\DEVEL\ >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
195
echo 'ECHO DIR DEVEL C:\DEVEL\ >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
169
for p in $COREPKGS ; do
196
for p in $COREPKGS ; do
170
  cp "$CDROOT/$p.svp" "$DOSEMUDIR/"
197
  cp "$CDROOT/$p.svp" "$DOSEMUDIR/"
171
  echo "pkg install $p.svp" >> "$DOSEMUDIR/install.bat"
198
  echo "pkg install $p.svp" >> "$DOSEMUDIR/install.bat"
172
  echo "del $p.svp" >> "$DOSEMUDIR/install.bat"
199
  echo "del $p.svp" >> "$DOSEMUDIR/install.bat"
173
done
200
done
174
echo 'ECHO my_ip = dhcp >> %DOSDIR%\CFG\WATTCP.CFG' >> "$DOSEMUDIR/install.bat"
201
echo 'ECHO my_ip = dhcp >> %DOSDIR%\CFG\WATTCP.CFG' >> "$DOSEMUDIR/install.bat"
175
echo 'del pkg.exe' >> "$DOSEMUDIR/install.bat"
202
echo 'del pkg.exe' >> "$DOSEMUDIR/install.bat"
176
echo 'ECHO SHELLHIGH=C:\SVARDOS\BIN\COMMAND.COM /P >> C:\CONFIG.SYS' >> "$DOSEMUDIR/install.bat"
203
echo 'ECHO SHELLHIGH=C:\SVARDOS\BIN\COMMAND.COM /P >> C:\CONFIG.SYS' >> "$DOSEMUDIR/install.bat"
177
echo 'ECHO.' >> "$DOSEMUDIR/install.bat"
204
echo 'ECHO.' >> "$DOSEMUDIR/install.bat"
178
echo 'ECHO -------------------------' >> "$DOSEMUDIR/install.bat"
205
echo 'ECHO -------------------------' >> "$DOSEMUDIR/install.bat"
179
echo 'ECHO  SVARDOS SETUP COMPLETED ' >> "$DOSEMUDIR/install.bat"
206
echo 'ECHO  SVARDOS SETUP COMPLETED ' >> "$DOSEMUDIR/install.bat"
180
echo 'ECHO -------------------------' >> "$DOSEMUDIR/install.bat"
207
echo 'ECHO -------------------------' >> "$DOSEMUDIR/install.bat"
181
echo 'ECHO.' >> "$DOSEMUDIR/install.bat"
208
echo 'ECHO.' >> "$DOSEMUDIR/install.bat"
182
unzip -Cj "$REPOROOT/core/kernel.svp" bin/kernel.sys -d "$DOSEMUDIR/"
209
unzip -Cj "$REPOROOT/core/kernel.svp" bin/kernel.sys -d "$DOSEMUDIR/"
183
unzip -Cj "$REPOROOT/core/command.svp" bin/command.com -d "$DOSEMUDIR/"
210
unzip -Cj "$REPOROOT/core/command.svp" bin/command.com -d "$DOSEMUDIR/"
184
unzip -Cj "$REPOROOT/core/pkg.svp" bin/pkg.exe -d "$DOSEMUDIR/"
211
unzip -Cj "$REPOROOT/core/pkg.svp" bin/pkg.exe -d "$DOSEMUDIR/"
185
# CONFIG.SYS
212
# CONFIG.SYS
186
echo 'FILES=50' >> "$DOSEMUDIR/config.sys"
213
echo 'FILES=50' >> "$DOSEMUDIR/config.sys"
187
echo 'DOS=HIGH,UMB' >> "$DOSEMUDIR/config.sys"
214
echo 'DOS=HIGH,UMB' >> "$DOSEMUDIR/config.sys"
188
echo 'DOSDATA=UMB' >> "$DOSEMUDIR/config.sys"
215
echo 'DOSDATA=UMB' >> "$DOSEMUDIR/config.sys"
189
echo 'DEVICE=D:\dosemu\emufs.sys' >> "$DOSEMUDIR/config.sys"
216
echo 'DEVICE=D:\dosemu\emufs.sys' >> "$DOSEMUDIR/config.sys"
190
echo 'DEVICE=D:\dosemu\umb.sys' >> "$DOSEMUDIR/config.sys"
217
echo 'DEVICE=D:\dosemu\umb.sys' >> "$DOSEMUDIR/config.sys"
191
echo 'DEVICEHIGH=D:\dosemu\ems.sys' >> "$DOSEMUDIR/config.sys"
218
echo 'DEVICEHIGH=D:\dosemu\ems.sys' >> "$DOSEMUDIR/config.sys"
192
echo 'INSTALL=D:\dosemu\emufs.com' >> "$DOSEMUDIR/config.sys"
219
echo 'INSTALL=D:\dosemu\emufs.com' >> "$DOSEMUDIR/config.sys"
193
# AUTOEXEC.BAT
220
# AUTOEXEC.BAT
194
echo "@ECHO OFF" >> "$DOSEMUDIR/autoexec.bat"
221
echo "@ECHO OFF" >> "$DOSEMUDIR/autoexec.bat"
195
echo 'SET DOSDIR=C:\SVARDOS' >> "$DOSEMUDIR/autoexec.bat"
222
echo 'SET DOSDIR=C:\SVARDOS' >> "$DOSEMUDIR/autoexec.bat"
196
echo 'SET WATTCP.CFG=%DOSDIR%\CFG' >> "$DOSEMUDIR/autoexec.bat"
223
echo 'SET WATTCP.CFG=%DOSDIR%\CFG' >> "$DOSEMUDIR/autoexec.bat"
197
echo 'SET DIRCMD=/p/ogne' >> "$DOSEMUDIR/autoexec.bat"
224
echo 'SET DIRCMD=/p/ogne' >> "$DOSEMUDIR/autoexec.bat"
198
echo 'SET TEMP=C:\TEMP' >> "$DOSEMUDIR/autoexec.bat"
225
echo 'SET TEMP=C:\TEMP' >> "$DOSEMUDIR/autoexec.bat"
199
echo 'PATH %DOSDIR%\BIN' >> "$DOSEMUDIR/autoexec.bat"
226
echo 'PATH %DOSDIR%\BIN' >> "$DOSEMUDIR/autoexec.bat"
200
echo "" >> "$DOSEMUDIR/autoexec.bat"
227
echo "" >> "$DOSEMUDIR/autoexec.bat"
201
echo "REM *** this is a one-time setup script used only during first initialization ***" >> "$DOSEMUDIR/autoexec.bat"
228
echo "REM *** this is a one-time setup script used only during first initialization ***" >> "$DOSEMUDIR/autoexec.bat"
202
echo 'IF EXIST INSTALL.BAT CALL INSTALL.BAT' >> "$DOSEMUDIR/autoexec.bat"
229
echo 'IF EXIST INSTALL.BAT CALL INSTALL.BAT' >> "$DOSEMUDIR/autoexec.bat"
203
echo 'IF EXIST INSTALL.BAT DEL INSTALL.BAT' >> "$DOSEMUDIR/autoexec.bat"
230
echo 'IF EXIST INSTALL.BAT DEL INSTALL.BAT' >> "$DOSEMUDIR/autoexec.bat"
204
echo "" >> "$DOSEMUDIR/autoexec.bat"
231
echo "" >> "$DOSEMUDIR/autoexec.bat"
205
echo "ECHO." >> "$DOSEMUDIR/autoexec.bat"
232
echo "ECHO." >> "$DOSEMUDIR/autoexec.bat"
206
echo "ECHO Welcome to SvarDOS (powered by DOSEMU)! Type HELP if you are lost." >> "$DOSEMUDIR/autoexec.bat"
233
echo "ECHO Welcome to SvarDOS (powered by DOSEMU)! Type HELP if you are lost." >> "$DOSEMUDIR/autoexec.bat"
207
echo "ECHO." >> "$DOSEMUDIR/autoexec.bat"
234
echo "ECHO." >> "$DOSEMUDIR/autoexec.bat"
208
rm -f "$PUBDIR/svardos-dosemu.zip"
235
rm -f "$PUBDIR/svardos-dosemu.zip"
209
zip -rm9jk "$PUBDIR/svardos-$CURDATE-dosemu.zip" "$DOSEMUDIR"
236
zip -rm9jk "$PUBDIR/svardos-$CURDATE-dosemu.zip" "$DOSEMUDIR"
210
rmdir "$DOSEMUDIR"
237
rmdir "$DOSEMUDIR"
211
 
238
 
-
 
239
echo
-
 
240
echo "### Computing the USB image"
-
 
241
echo
-
 
242
 
212
# prepare the USB bootable image
243
# prepare the USB bootable image
213
USBIMG=$PUBDIR/svardos-usb.img
244
USBIMG=$PUBDIR/svardos-usb.img
214
cp files/boot-svardos.img $USBIMG
245
cp files/boot-svardos.img $USBIMG
215
mcopy -sQm -i "$USBIMG@@32256" "$FLOPROOT/"* ::/
246
mcopy -sQm -i "$USBIMG@@32256" "$FLOPROOT/"* ::/
216
for p in $ALLPKGS ; do
247
for p in $ALLPKGS ; do
217
  mcopy -mi "$USBIMG@@32256" "$CDROOT/$p.svp" ::/
248
  mcopy -mi "$USBIMG@@32256" "$CDROOT/$p.svp" ::/
218
done
249
done
219
 
250
 
220
# compress the USB image
251
# compress the USB image
221
rm -f "$PUBDIR/svardos-usb.zip"
-
 
222
zip -mj9 "$PUBDIR/svardos-$CURDATE-usb.zip" "$USBIMG"
252
zip -mj9 "$PUBDIR/svardos-$CURDATE-usb.zip" "$USBIMG"
223
 
253
 
224
# prepare the USB-ZIP bootable image
254
# prepare the USB-ZIP bootable image
225
#USBZIPIMG=$PUBDIR/svardos-usbzip.img
255
#USBZIPIMG=$PUBDIR/svardos-usbzip.img
226
#cat files/usb-zip.mbr "$PUBDIR/svardos-zip100.img" > $USBZIPIMG
256
#cat files/usb-zip.mbr "$PUBDIR/svardos-zip100.img" > $USBZIPIMG
227
 
257
 
-
 
258
echo
-
 
259
echo "### Generating ISO CD image"
-
 
260
echo
-
 
261
 
228
CDISO="$PUBDIR/svardos-$CURDATE-cd.iso"
262
CDISO="$PUBDIR/svardos-$CURDATE-cd.iso"
229
CDZIP="$PUBDIR/svardos-$CURDATE-cd.zip"
263
CDZIP="$PUBDIR/svardos-$CURDATE-cd.zip"
230
 
264
 
231
# delete previous (if any) iso
265
# delete previous (if any) iso
232
echo "cleaning up old versions..."
266
#echo "cleaning up old versions..."
233
rm -f "$CDISO" "$CDZIP"
267
#rm -f "$CDISO" "$CDZIP"
234
 
268
 
235
$GENISOIMAGE -input-charset cp437 -b boot.img -iso-level 1 -f -V SVARDOS -o "$CDISO" "$CDROOT/boot.img"
269
$GENISOIMAGE -input-charset cp437 -b boot.img -iso-level 1 -f -V SVARDOS -o "$CDISO" "$CDROOT/boot.img"
236
 
270
 
237
# compress the ISO
271
# compress the ISO
238
zip -mj9 "$CDZIP" "$CDISO"
272
zip -mj9 "$CDZIP" "$CDISO"
239
 
273
 
240
# cleanup temporary things
274
# cleanup temporary things
241
if [ "x$1" != "xnoclean" ] ; then
275
if [ "x$2" != "xnoclean" ] ; then
-
 
276
  echo
-
 
277
  echo "### Clenup of temporary directories:"
-
 
278
  echo "# $CDROOT"
-
 
279
  echo "# $FLOPROOT"
-
 
280
  echo
242
  rm -rf "$CDROOT" "$FLOPROOT"
281
  rm -rf "$CDROOT" "$FLOPROOT"
243
fi
282
fi
244
 
283
 
245
cd "$origdir"
284
cd "$origdir"
246
 
285
 
247
#cd svnlschk
286
#cd svnlschk
248
#./webgen.sh
287
#./webgen.sh
249
#cd ..
288
#cd ..
250
 
289
 
-
 
290
echo
251
echo "ALL DONE!"
291
echo "### ALL DONE! ###"
252
 
292
 
253
exit 0
293
exit 0
254
 
294