Subversion Repositories SvarDOS

Rev

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

Rev 11 Rev 12
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# This script generates indexes of Svarog386 repositories and builds the ISO
3
# This script generates indexes of Svarog386 repositories and builds the ISO
4
# CD images. It should be executed each time that a package file have been
4
# CD images. It should be executed each time that a package file have been
5
# modified, added or removed from any of the repositories.
5
# modified, added or removed from any of the repositories.
6
#
6
#
7
 
7
 
8
### parameters block starts here ############################################
8
### parameters block starts here ############################################
9
 
9
 
10
REPOROOT=/srv/www/svarog386.viste.fr/repos/
10
REPOROOT=/srv/www/svarog386.viste.fr/repos/
11
BUILDIDX=/root/fdnpkg-buildidx/buildidx
11
BUILDIDX=/root/fdnpkg-buildidx/buildidx
12
CDISODIR='/srv/www/svarog386.viste.fr/'
12
CDISODIR='/srv/www/svarog386.viste.fr/'
13
CDROOT='/root/svarog386/cdroot'
13
CDROOT='/root/svarog386/cdroot'
14
 
14
 
15
### parameters block ends here ##############################################
15
### parameters block ends here ##############################################
16
 
16
 
17
# remember where we are, so we can return there once all is done
17
# remember where we are, so we can return there once all is done
18
origdir=`pwd`
18
origdir=`pwd`
19
 
19
 
20
# first go to the root of repositories and refresh'em all
20
# first go to the root of repositories and refresh'em all
21
cd $REPOROOT
21
cd $REPOROOT
22
rm listing.txt
22
rm listing.txt
23
$BUILDIDX base
23
$BUILDIDX base
24
if [ $? -ne 0 ] ; then exit 1 ; fi
24
if [ $? -ne 0 ] ; then exit 1 ; fi
25
$BUILDIDX devel
25
$BUILDIDX devel
26
if [ $? -ne 0 ] ; then exit 1 ; fi
26
if [ $? -ne 0 ] ; then exit 1 ; fi
27
$BUILDIDX drivers
27
$BUILDIDX drivers
28
if [ $? -ne 0 ] ; then exit 1 ; fi
28
if [ $? -ne 0 ] ; then exit 1 ; fi
29
$BUILDIDX edit
29
$BUILDIDX edit
30
if [ $? -ne 0 ] ; then exit 1 ; fi
30
if [ $? -ne 0 ] ; then exit 1 ; fi
31
$BUILDIDX emulatrs
31
$BUILDIDX emulatrs
32
if [ $? -ne 0 ] ; then exit 1 ; fi
32
if [ $? -ne 0 ] ; then exit 1 ; fi
33
$BUILDIDX games
33
$BUILDIDX games
34
if [ $? -ne 0 ] ; then exit 1 ; fi
34
if [ $? -ne 0 ] ; then exit 1 ; fi
35
$BUILDIDX net
35
$BUILDIDX net
36
if [ $? -ne 0 ] ; then exit 1 ; fi
36
if [ $? -ne 0 ] ; then exit 1 ; fi
37
$BUILDIDX packers
37
$BUILDIDX packers
38
if [ $? -ne 0 ] ; then exit 1 ; fi
38
if [ $? -ne 0 ] ; then exit 1 ; fi
39
$BUILDIDX sound
39
$BUILDIDX sound
40
if [ $? -ne 0 ] ; then exit 1 ; fi
40
if [ $? -ne 0 ] ; then exit 1 ; fi
41
$BUILDIDX util
41
$BUILDIDX util
42
 
42
 
43
# compute a filename for the ISO file and build it
43
# compute a filename for the ISO file and build it
44
CDISO="$CDISODIR/svarog386-`date +%Y%m%d-%H%M`.iso"
44
CDISO="$CDISODIR/svarog386-`date +%Y%m%d-%H%M`.iso"
45
genisoimage -input-charset cp437 -b boot.img -iso-level 1 -f -o $CDISO.tmp $CDROOT
45
genisoimage -input-charset cp437 -b boot.img -iso-level 1 -f -o $CDISO.tmp $CDROOT
46
if [ $? -ne 0 ] ; then exit 1 ; fi
46
if [ $? -ne 0 ] ; then exit 1 ; fi
47
mv $CDISO.tmp $CDISO
47
mv $CDISO.tmp $CDISO
48
 
48
 
49
# compute the MD5 of the ISO file, taking care to include only the filename in it
49
# compute the MD5 of the ISO file, taking care to include only the filename in it
50
cd `dirname $CDISO`
50
cd `dirname $CDISO`
51
md5sum `basename $CDISO` > $CDISO.md5
51
md5sum `basename $CDISO` > $CDISO.md5
52
 
52
 
53
cd "$origdir"
53
cd "$origdir"
54
 
54
 
55
exit 0
55
exit 0
56
 
56