source: MondoRescue/branches/stable/tools/svn2tar@ 549

Last change on this file since 549 was 549, checked in by bcornec, 18 years ago

Build process update:
3 phases work:

svn2tar creates the source tar files instantiated from SVN
svn2build creates all the pkg build scripts for all pkgs from SVN
mkqemu will then uses these results to create the real pkgs

creation of a svn-env containing the SVN part of common-env

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.9 KB
RevLine 
[20]1#!/bin/bash
2#
[547]3# Prepare source packages from SVN repository as a tar file
4# Also prepare the documentation which is common as a separate tar files
[33]5#
6# $Id: svn2tar 549 2006-05-13 23:42:49Z bcornec $
7#
[20]8
[157]9umask 022
[547]10dname=`dirname $0`
11prem=`echo $dname |cut -c1`
12if [ ${prem} == "/" ]; then
13 export TOOLHOME=$dname
14else
15 export TOOLHOME=${PWD}/$dname
16fi
[20]17
[547]18cd $TOOLHOME
19. ./common-env
[549]20. ./svn-env
[33]21
[547]22mkdir -p ${TOPDIR}/SOURCES
23
[20]24if [ "$1" = "" ]; then
[543]25 c="mondo-doc mindi mondo"
[20]26else
[543]27 if [ "$1" = "all" ]; then
28 c="mindi-kernel mondo-doc mindi mondo"
29 else
30 c=$1
31 fi
[20]32fi
[318]33
[543]34
[547]35cd ${BASE}/svn
36
[548]37for p in $c; do
38 v=`cat ${SVNBRANCH}/$p/VERSION`
[547]39 echo "Management of $p $v-$REVISION"
40 rm -fr $p-$v
[548]41 svn export ${SVNBRANCH}/$p $p-$v
[547]42 echo "$REVISION" > $p-$v/REVISION
43 echo "Generating SVN log file ..."
[548]44 svn log -v ${SVNBRANCH}/$p > $p-$v/svn.log
[547]45
46 if [ _"`echo $p | grep mondo-doc`" != _"" ]; then
47 cd ${p}-${v}
48 $TOOLHOME/expandver mondorescue-howto.sgml *8
49 make -f Makefile.howto
50 if [ $? != 0 ]; then
51 exit -1
52 fi
53 make -f Makefile.man
54 if [ $? != 0 ]; then
55 exit -1
56 fi
57 cd ..
[545]58 fi
[547]59
60 if [ _"`echo $p | grep -v kernel | grep mindi`" != _"" ]; then
[548]61 v1=`cat ${SVNBRANCH}/mondo-doc/VERSION`
[547]62 if [ ! -d mondo-doc-$v1 ]; then
63 echo "mondo-doc should be created before $p"
64 exit -1
65 fi
66 (cd mondo-doc-$v1 ; make -f Makefile.man install-$p INSTALLDIR=../$p-$v)
[548]67 rm -f $p-$v/rootfs/sbin/parted2fdisk-ia64
[545]68 fi
[547]69 if [ "`echo $p | grep -v doc | grep mondo`" != "" ]; then
[548]70 v1=`cat ${SVNBRANCH}/mondo-doc/VERSION`
[547]71 if [ ! -d mondo-doc-$v1 ]; then
72 echo "mondo-doc should be created before $p"
73 exit -1
74 fi
75 (cd mondo-doc-$v1 ; make -f Makefile.howto install INSTALLDIR=../$p-$v/docs/en ; make -f Makefile.man install-$p INSTALLDIR=../$p-$v/docs/man)
76 (cd $p-$v ; echo "Bootstraping mondo ... " ; ./bootstrap)
77 fi
[544]78
[547]79 # Finally creates the tar files
80 echo "Creating $p tar files"
[548]81 tar cfhz ${TOPDIR}/SOURCES/$p-$v-$TAG.tgz $p-$v
82 tar cfhj ${TOPDIR}/SOURCES/$p-$v-$TAG.tar.bz2 $p-$v
[547]83done
Note: See TracBrowser for help on using the repository browser.