source: branches/2.0.8/tools/mkcommon @ 535

Last change on this file since 535 was 535, checked in by bcornec, 14 years ago

merge -r 526:530 $SVN_M/branches/stable

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 3.1 KB
RevLine 
[20]1#!/bin/bash
2#
[319]3# Prepare build env common for all packages build process from SVN repository
[535]4# Also prepare the documentation which is common
[33]5#
6# $Id: mkcommon 535 2006-05-11 23:58:09Z bcornec $
7#
[20]8
[157]9umask 022
[20]10
[535]11cd $TOOLHOME/..
[319]12echo "Generating SVN log file ..."
[311]13svn log -v > /tmp/mondorescue-svn.log
[33]14
[20]15if [ "$1" = "" ]; then
[535]16        c="mondo-doc mindi mondo"
[20]17else
[535]18    if [ "$1" = "all" ]; then
19            c="mindi-kernel mondo-doc mindi mondo"
20    else
21        c=$1
22    fi
[20]23fi
[204]24if [ "`echo $c | grep mindi-kernel`" != "" ]; then
[20]25    cd ${BASE}/svn
[319]26    echo "Management of mindi-kernel ${MINDI_VER}-$REVISION"
[204]27    rm -fr mindi-kernel-${MINDI_VER}
[338]28    svn export ${VER}/mindi-kernel mindi-kernel-${MINDI_VER}
[204]29    mkdir -p ${TOPDIR}/SOURCES
[318]30
31    echo "Creating mindi-kernel tar files"
[204]32    tar cvfhz ${TOPDIR}/SOURCES/mindi-kernel-${MINDI_VER}.tgz mindi-kernel-${MINDI_VER}
33    tar cvfhj ${TOPDIR}/SOURCES/mindi-kernel-${MINDI_VER}.tar.bz2 mindi-kernel-${MINDI_VER}
34fi
[535]35
36#
37# Should be done before mindi
38#
39if [ "`echo $c | grep mondo-doc`" != "" ]; then
40    cd ${BASE}/svn
41    echo "Management of mondo-doc ${MONDO_VER}-$REVISION"
42    rm -rf mondo-doc-${MONDO_VER}
43    svn export ${VER}/documentation mondo-doc-${MONDO_VER}
44    svn log -v ${VER}/documentation > mondo-doc-${MONDO_VER}/svn.log
45    echo "$REVISION" > mondo-doc-${MONDO_VER}/REVISION
46    cd mondo-doc-${MONDO_VER}
47    $TOOLHOME/expandver mondorescue-howto.sgml *8
48    make -f Makefile.howto install INSTALLDIR=../mondo-docgen-${MONDO_VER}/docs/en
49    if [ $? != 0 ]; then
50        exit -1
51    fi
52    make -f Makefile.man install-mondo INSTALLDIR=../mondo-docgen-${MONDO_VER}/docs/man
53    if [ $? != 0 ]; then
54        exit -1
55    fi
56    cd ..
57
58    echo "Creating mondo-doc tar files"
59    tar cfhz ${TOPDIR}/SOURCES/mondo-doc-${MONDO_VER}.tgz mondo-doc-${MONDO_VER}
60    tar cfhj ${TOPDIR}/SOURCES/mondo-doc-${MONDO_VER}.tar.bz2 mondo-doc-${MONDO_VER}
61fi
[204]62if [ "`echo $c | grep -v kernel | grep mindi`" != "" ]; then
63    cd ${BASE}/svn
[319]64    echo "Management of mindi ${MINDI_VER}-$REVISION"
[20]65    rm -fr mindi-${MINDI_VER}
[338]66    svn export ${VER}/mindi mindi-${MINDI_VER}
[311]67    cp -a /tmp/mondorescue-svn.log mindi-${MINDI_VER}/svn.log
[535]68    (cd mondo-doc-${MONDO_VER} ; make -f Makefile.man install-mindi INSTALLDIR=../mindi-${MINDI_VER})
[338]69    echo "$REVISION" > mindi-${MINDI_VER}/REVISION
70    rm -f mindi-${MINDI_VER}/rootfs/sbin/parted2fdisk-ia64
[318]71
72    echo "Creating mindi tar files"
73    tar cfhz ${TOPDIR}/SOURCES/mindi-${MINDI_VER}.tgz mindi-${MINDI_VER}
74    tar cfhj ${TOPDIR}/SOURCES/mindi-${MINDI_VER}.tar.bz2 mindi-${MINDI_VER}
[20]75    rm -f ${TMP}/mindi-*-root
76fi
[535]77if [ "`echo $c | grep -v doc | grep  mondo`" != "" ]; then
[20]78    cd ${BASE}/svn
[319]79    echo "Management of mondo ${MONDO_VER}-$REVISION"
[20]80    rm -rf mondo-${MONDO_VER}
[338]81    svn export ${VER}/mondo mondo-${MONDO_VER}
[311]82    cp -a /tmp/mondorescue-svn.log mondo-${MONDO_VER}/svn.log
[338]83    echo "$REVISION" > mondo-${MONDO_VER}/REVISION
[535]84    (cd mondo-doc-${MONDO_VER} ; make -f Makefile.howto install INSTALLDIR=../mondo-${MONDO_VER}/docs/en ; make -f Makefile.man install-mondo INSTALLDIR=../mondo-${MONDO_VER}/docs/man)
85    (cd mondo-${MONDO_VER} ; echo "Bootstraping mondo ... " ; ./bootstrap)
[318]86
87    echo "Creating mondo tar files"
88    tar cfhz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}.tgz mondo-${MONDO_VER}
89    tar cfhj ${TOPDIR}/SOURCES/mondo-${MONDO_VER}.tar.bz2 mondo-${MONDO_VER}
[20]90    rm -f ${TMP}/mondo-*-root
91fi
Note: See TracBrowser for help on using the repository browser.