source: trunk/tools/mkcommon @ 404

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

merge -r397:402 $SVN_M/branches/stable

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