Subversion Repositories SvarDOS

Rev

Rev 2 | Rev 12 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 mv_fox 1
#!/bin/sh
11 mv_fox 2
#
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
5
# modified, added or removed from any of the repositories.
6
#
2 mv_fox 7
 
11 mv_fox 8
### parameters block starts here ############################################
9
 
2 mv_fox 10
REPOROOT=/srv/www/svarog386.viste.fr/repos/
11
BUILDIDX=/root/fdnpkg-buildidx/buildidx
11 mv_fox 12
CDISODIR='/srv/www/svarog386.viste.fr/'
13
CDROOT='/root/svarog386/cdroot'
2 mv_fox 14
 
11 mv_fox 15
### parameters block ends here ##############################################
16
 
17
# remember where we are, so we can return there once all is done
18
origdir=`pwd`
19
 
20
# first go to the root of repositories and refresh'em all
2 mv_fox 21
cd $REPOROOT
22
rm listing.txt
23
$BUILDIDX base
24
if [ $? -ne 0 ] ; then exit 1 ; fi
25
$BUILDIDX devel
26
if [ $? -ne 0 ] ; then exit 1 ; fi
27
$BUILDIDX drivers
28
if [ $? -ne 0 ] ; then exit 1 ; fi
29
$BUILDIDX edit
30
if [ $? -ne 0 ] ; then exit 1 ; fi
31
$BUILDIDX emulatrs
32
if [ $? -ne 0 ] ; then exit 1 ; fi
33
$BUILDIDX games
34
if [ $? -ne 0 ] ; then exit 1 ; fi
35
$BUILDIDX net
36
if [ $? -ne 0 ] ; then exit 1 ; fi
37
$BUILDIDX packers
38
if [ $? -ne 0 ] ; then exit 1 ; fi
39
$BUILDIDX sound
40
if [ $? -ne 0 ] ; then exit 1 ; fi
41
$BUILDIDX util
42
 
11 mv_fox 43
# compute a filename for the ISO file and build it
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
46
if [ $? -ne 0 ] ; then exit 1 ; fi
47
mv $CDISO.tmp $CDISO
2 mv_fox 48
 
11 mv_fox 49
# compute the MD5 of the ISO file, taking care to include only the filename in it
50
cd `dirname $CDISO`
51
md5sum `basename $CDISO` > $CDISO.md5
52
 
53
cd "$origdir"
54
 
2 mv_fox 55
exit 0