source: branches/2.04_berlios/tools/rpm-env @ 60

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

delivery process now handles all the main rpm based distro

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1#!/bin/bash
2#
3# Creates RPMs environment from SVN repository
4#
5# $Id: rpm-env 60 2005-10-14 13:25:06Z bcornec $
6#
7
8# Adapt to your needs
9export BASE=${HOME}/mondo
10export SVNAUTH=bcornec@shell.berlios.de
11export DSTDIR=/home/groups/ftp/pub/mondorescue
12export FTPURL="ftp.berlios.de /incoming"
13
14# Should not be modified below
15export VER=branches/2.04_berlios
16export pkg=""
17export opt=""
18export ARCH=`rpm --showrc | egrep "^build arch" | awk '{print $4}'`
19
20mkdir -p ${BASE}/RPMS
21export TMP=${BASE}/tmp
22mkdir -p ${TMP}
23if [ -f ${HOME}/.rpmmacros ]; then
24    export TOPDIR=`egrep '^%_topdir' ${HOME}/.rpmmacros | awk '{print $2}'`
25else
26    export TOPDIR=${BASE}/RPMS
27fi
28cd ${TOPDIR}
29mkdir -p RPMS SRPMS SPECS SOURCES BUILD
30
31export MINDI_VER=`cat ${BASE}/svn/${VER}/mindi/mindi.spec | egrep '^%define version' | awk '{print $3}' | sed "s/[  ]*//"`
32export MONDO_VER=`cat ${BASE}/svn/${VER}/mondo/mondo.spec | egrep '^%define version' | awk '{print $3}' | sed "s/[  ]*//"`
33
34if [ -e /etc/mandriva-release ]; then
35    export ddir="mandriva"
36    export dver=`cat /etc/mandriva-release | awk '{print $4}'`
37    export suf="${dver}mdk"
38elif [ -e /etc/mandrake-release ]; then
39    export ddir="mandrake"
40    export dver=`cat /etc/mandrake-release | awk '{print $3}'`
41    export suf="${dver}mdk"
42elif [ -e /etc/redhat-release ]; then
43    if [ `grep -q Enterprise /etc/redhat-release` ]; then
44        export ddir="rhel"
45        export dver=`cat /etc/redhat-release | awk '{print $7}'`
46    else
47        export ddir="redhat"
48        export dver=`cat /etc/redhat-release | awk '{print $5}'`
49    fi
50elif [ -e /etc/SuSE-release ]; then
51    export ddir="suse"
52    export dver=`cat /etc/SuSE-release | head -1 | awk '{print $3}'`
53else
54    export dver=""
55    export ddir="generic"
56fi
57
58if [ _"$suf" = _"" ]; then
59    export suf="${ddir}${dver}"
60fi
Note: See TracBrowser for help on using the repository browser.