Subversion Repositories SvarDOS

Rev

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

Rev 19 Rev 24
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
REPOROOTNOSRC=/srv/www/svarog386.viste.fr/repos-nosrc/
11
REPOROOTNOSRC=/srv/www/svarog386.viste.fr/repos-nosrc/
12
BUILDIDX=/root/fdnpkg-buildidx/buildidx
12
BUILDIDX=/root/fdnpkg-buildidx/buildidx
13
CDISODIR='/srv/www/svarog386.viste.fr/'
13
CDISODIR='/srv/www/svarog386.viste.fr/'
14
CDROOT='/root/svarog386/cdroot'
14
CDROOT='/root/svarog386/cdroot'
15
CDROOTNOSRC='/root/svarog386/cdrootnosrc'
15
CDROOTNOSRC='/root/svarog386/cdrootnosrc'
-
 
16
CDROOTMICRO='/root/svarog386/cdrootmicro'
16
 
17
 
17
### parameters block ends here ##############################################
18
### parameters block ends here ##############################################
18
 
19
 
19
# remember where we are, so we can return there once all is done
20
# remember where we are, so we can return there once all is done
20
origdir=`pwd`
21
origdir=`pwd`
21
 
22
 
22
# clone the repositories into future 'no source' versions
23
# clone the repositories into future 'no source' versions
23
echo "cloning $REPOROOT to $REPOROOTNOSRC..."
24
echo "cloning $REPOROOT to $REPOROOTNOSRC..."
24
rsync -a --delete $REPOROOT $REPOROOTNOSRC
25
rsync -a --delete $REPOROOT $REPOROOTNOSRC
25
if [ $? -ne 0 ] ; then exit 1 ; fi
26
if [ $? -ne 0 ] ; then exit 1 ; fi
26
 
27
 
27
# sync the boot.img file from full version to the nosrc one
28
# sync the boot.img file from full version to nosrc and micro
28
cp $CDROOT/boot.img $CDROOTNOSRC/
29
cp $CDROOT/boot.img $CDROOTNOSRC/
29
if [ $? -ne 0 ] ; then exit 1 ; fi
30
if [ $? -ne 0 ] ; then exit 1 ; fi
-
 
31
cp $CDROOT/boot.img $CDROOTMICRO/
-
 
32
if [ $? -ne 0 ] ; then exit 1 ; fi
30
 
33
 
31
# now strip the sources from the 'no source' clone
34
# now strip the sources from the 'no source' clone
32
find $REPOROOTNOSRC/ -iname '*.zip' -exec zip "{}" -d "SOURCE/*" ';'
35
find $REPOROOTNOSRC/ -iname '*.zip' -exec zip "{}" -d "SOURCE/*" ';'
33
find $REPOROOTNOSRC/ -iname '*.zip' -exec zip "{}" -d "source/*" ';'
36
find $REPOROOTNOSRC/ -iname '*.zip' -exec zip "{}" -d "source/*" ';'
34
find $REPOROOTNOSRC/ -iname '*.zip' -exec zip "{}" -d "Source/*" ';'
37
find $REPOROOTNOSRC/ -iname '*.zip' -exec zip "{}" -d "Source/*" ';'
35
 
38
 
36
# refresh all repositories
39
# refresh all repositories
37
cd "$REPOROOT"
40
cd "$REPOROOT"
38
rm listing.txt
41
rm listing.txt
39
$BUILDIDX $REPOROOT/base && $BUILDIDX $REPOROOTNOSRC/base
42
$BUILDIDX $REPOROOT/base && $BUILDIDX $REPOROOTNOSRC/base
40
if [ $? -ne 0 ] ; then exit 1 ; fi
43
if [ $? -ne 0 ] ; then exit 1 ; fi
41
$BUILDIDX $REPOROOT/devel && $BUILDIDX $REPOROOTNOSRC/devel
44
$BUILDIDX $REPOROOT/devel && $BUILDIDX $REPOROOTNOSRC/devel
42
if [ $? -ne 0 ] ; then exit 1 ; fi
45
if [ $? -ne 0 ] ; then exit 1 ; fi
43
$BUILDIDX $REPOROOT/drivers && $BUILDIDX $REPOROOTNOSRC/drivers
46
$BUILDIDX $REPOROOT/drivers && $BUILDIDX $REPOROOTNOSRC/drivers
44
if [ $? -ne 0 ] ; then exit 1 ; fi
47
if [ $? -ne 0 ] ; then exit 1 ; fi
45
$BUILDIDX $REPOROOT/edit && $BUILDIDX $REPOROOTNOSRC/edit
48
$BUILDIDX $REPOROOT/edit && $BUILDIDX $REPOROOTNOSRC/edit
46
if [ $? -ne 0 ] ; then exit 1 ; fi
49
if [ $? -ne 0 ] ; then exit 1 ; fi
47
$BUILDIDX $REPOROOT/emulatrs && $BUILDIDX $REPOROOTNOSRC/emulatrs
50
$BUILDIDX $REPOROOT/emulatrs && $BUILDIDX $REPOROOTNOSRC/emulatrs
48
if [ $? -ne 0 ] ; then exit 1 ; fi
51
if [ $? -ne 0 ] ; then exit 1 ; fi
49
$BUILDIDX $REPOROOT/games && $BUILDIDX $REPOROOTNOSRC/games
52
$BUILDIDX $REPOROOT/games && $BUILDIDX $REPOROOTNOSRC/games
50
if [ $? -ne 0 ] ; then exit 1 ; fi
53
if [ $? -ne 0 ] ; then exit 1 ; fi
51
$BUILDIDX $REPOROOT/net && $BUILDIDX $REPOROOTNOSRC/net
54
$BUILDIDX $REPOROOT/net && $BUILDIDX $REPOROOTNOSRC/net
52
if [ $? -ne 0 ] ; then exit 1 ; fi
55
if [ $? -ne 0 ] ; then exit 1 ; fi
53
$BUILDIDX $REPOROOT/packers && $BUILDIDX $REPOROOTNOSRC/packers
56
$BUILDIDX $REPOROOT/packers && $BUILDIDX $REPOROOTNOSRC/packers
54
if [ $? -ne 0 ] ; then exit 1 ; fi
57
if [ $? -ne 0 ] ; then exit 1 ; fi
55
$BUILDIDX $REPOROOT/sound && $BUILDIDX $REPOROOTNOSRC/sound
58
$BUILDIDX $REPOROOT/sound && $BUILDIDX $REPOROOTNOSRC/sound
56
if [ $? -ne 0 ] ; then exit 1 ; fi
59
if [ $? -ne 0 ] ; then exit 1 ; fi
57
$BUILDIDX $REPOROOT/util && $BUILDIDX $REPOROOTNOSRC/util
60
$BUILDIDX $REPOROOT/util && $BUILDIDX $REPOROOTNOSRC/util
58
if [ $? -ne 0 ] ; then exit 1 ; fi
61
if [ $? -ne 0 ] ; then exit 1 ; fi
59
 
62
 
60
# compute a filename for the ISO files and build it
63
# compute a filename for the ISO files and build it
61
DATESTAMP=`date +%Y%m%d-%H%M`
64
DATESTAMP=`date +%Y%m%d-%H%M`
62
CDISO="$CDISODIR/svarog386-full-$DATESTAMP.iso"
65
CDISO="$CDISODIR/svarog386-full-$DATESTAMP.iso"
63
CDISONOSRC="$CDISODIR/svarog386-nosrc-$DATESTAMP.iso"
66
CDISONOSRC="$CDISODIR/svarog386-nosrc-$DATESTAMP.iso"
-
 
67
CDISOMICRO="$CDISODIR/svarog386-micro-$DATESTAMP.iso"
64
genisoimage -input-charset cp437 -b boot.img -iso-level 1 -f -o $CDISO.tmp $CDROOT
68
genisoimage -input-charset cp437 -b boot.img -iso-level 1 -f -o $CDISO.tmp $CDROOT
65
if [ $? -ne 0 ] ; then exit 1 ; fi
69
if [ $? -ne 0 ] ; then exit 1 ; fi
66
genisoimage -input-charset cp437 -b boot.img -iso-level 1 -f -o $CDISONOSRC.tmp $CDROOTNOSRC
70
genisoimage -input-charset cp437 -b boot.img -iso-level 1 -f -o $CDISONOSRC.tmp $CDROOTNOSRC
67
if [ $? -ne 0 ] ; then exit 1 ; fi
71
if [ $? -ne 0 ] ; then exit 1 ; fi
-
 
72
genisoimage -input-charset cp437 -b boot.img -iso-level 1 -f -o $CDISOMICRO.tmp $CDROOTMICRO
-
 
73
if [ $? -ne 0 ] ; then exit 1 ; fi
68
mv $CDISO.tmp $CDISO
74
mv $CDISO.tmp $CDISO
69
mv $CDISONOSRC.tmp $CDISONOSRC
75
mv $CDISONOSRC.tmp $CDISONOSRC
-
 
76
mv $CDISOMICRO.tmp $CDISOMICRO
70
 
77
 
71
# compute the MD5 of the ISO files, taking care to include only the filename in it
78
# compute the MD5 of the ISO files, taking care to include only the filename in it
72
echo "computing md5 sums..."
79
echo "computing md5 sums..."
73
cd `dirname $CDISO`
80
cd `dirname $CDISO`
74
md5sum `basename $CDISO` > $CDISO.md5
81
md5sum `basename $CDISO` > $CDISO.md5
75
 
82
 
76
cd `dirname $CDISONOSRC`
83
cd `dirname $CDISONOSRC`
77
md5sum `basename $CDISONOSRC` > $CDISONOSRC.md5
84
md5sum `basename $CDISONOSRC` > $CDISONOSRC.md5
78
 
85
 
-
 
86
cd `dirname $CDISOMICRO`
-
 
87
md5sum `basename $CDISOMICRO` > $CDISOMICRO.md5
-
 
88
 
79
cd "$origdir"
89
cd "$origdir"
80
 
90
 
81
echo "all done!"
91
echo "all done!"
82
 
92
 
83
exit 0
93
exit 0
84
 
94