source: trunk/tools/mkdeliv @ 320

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

merge -r316:319 $SVN_M/branches/2.06

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1#!/bin/bash
2#
3# Deliver RPMs packages and tgz files to BerliOS
4#
5# $Id: mkdeliv 320 2006-01-14 23:29:12Z bcornec $
6#
7
8# BerliOS FTP/SSH setup
9BERLIOSAC=bcornec@shell.berlios.de
10DSTDIR=/home/groups/ftp/pub/mondorescue
11FTPSERV="ftp.berlios.de"
12FTPDIR="/incoming"
13
14dname=`dirname $0`
15prem=`echo $dname |cut -c1`
16if [ ${prem} == "/" ]; then
17        export TOOLHOME=$dname
18else
19    export TOOLHOME=${PWD}/$dname
20fi
21
22. $TOOLHOME/rpm-env
23
24tgz=""
25srpms=""
26rpms=""
27rev=`$TOOLHOME/mksvnversion`
28
29if [ "$1" = "" ]; then
30    c="mindi mondo"
31else
32    c=$1
33fi
34if [ "`echo $c | grep mindi`" != "" ]; then
35    cp -a ${TOPDIR}/SOURCES/mindi-${MINDI_VER}.tgz ${TOPDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tgz
36    cp -a ${TOPDIR}/SOURCES/mindi-${MINDI_VER}.tar.bz2 ${TOPDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tar.bz2
37    tgz="$tgz ${TOPDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tgz ${TOPDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tar.bz2"
38    rpms="$rpms ${TOPDIR}/RPMS/${ARCH}/mindi-${MINDI_VER}-${rev}.${suf}.${ARCH}.rpm"
39    srpms="$srpms ${TOPDIR}/SRPMS/mindi-${MINDI_VER}-${rev}.${suf}.src.rpm"
40fi
41if [ "`echo $c | grep  mondo`" != "" ]; then
42    cp -a ${TOPDIR}/SOURCES/mondo-${MONDO_VER}.tgz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tgz
43    cp -a ${TOPDIR}/SOURCES/mondo-${MONDO_VER}.tar.bz2 ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tar.bz2
44    tgz="$tgz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tgz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tar.bz2"
45    rpms="$rpms ${TOPDIR}/RPMS/${ARCH}/mondo-${MONDO_VER}-${rev}.${suf}.${ARCH}.rpm"
46    srpms="$srpms ${TOPDIR}/SRPMS/mondo-${MONDO_VER}-${rev}.${suf}.src.rpm"
47fi
48echo "Sources delivery to ${BERLIOSAC}:${DSTDIR}/src"
49scp ${tgz} ${BERLIOSAC}:${DSTDIR}/src
50ssh ${BERLIOSAC} "mkdir -p ${DSTDIR}/${ddir}/${dver}"
51echo "Packages delivery to ${BERLIOSAC}:${DSTDIR}/${ddir}/${dver}"
52scp ${rpms} ${BERLIOSAC}:${DSTDIR}/${ddir}/${dver}
53scp ${srpms} ${BERLIOSAC}:${DSTDIR}/${ddir}/${dver}
54echo "Sources delivery to ${FTPSERV} ${FTPDIR}"
55if [ "`which ncftpput`" != "" ]; then
56    ncftpput ${FTPSERV} ${FTPDIR} ${tgz}
57elif [ "`which lftp`" != "" ]; then
58    lftp -e "cd ${FTPDIR} ; put ${tgz} ; quit" ${FTPSERV}
59fi
Note: See TracBrowser for help on using the repository browser.