source: trunk/tools/mkdeliv @ 537

Last change on this file since 537 was 537, checked in by bcornec, 13 years ago

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

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
1#!/bin/bash
2#
3# Deliver RPMs packages and tgz files to ftp.mondorescue.org
4#
5# $Id: mkdeliv 537 2006-05-12 00:04:55Z bcornec $
6#
7
8# BerliOS FTP/SSH setup
9ACCOUNT=bruno@ftp.mondorescue.org
10DSTDIR=/mondo/ftp
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="mondo-doc 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-doc`" != "" ]; then
42    cp -a ${TOPDIR}/SOURCES/mondo-doc-${MONDO_VER}.tgz ${TOPDIR}/SOURCES/mondo-doc-${MONDO_VER}-r${rev}.tgz
43    cp -a ${TOPDIR}/SOURCES/mondo-doc-${MONDO_VER}.tar.bz2 ${TOPDIR}/SOURCES/mondo-doc-${MONDO_VER}-r${rev}.tar.bz2
44    tgz="$tgz ${TOPDIR}/SOURCES/mondo-doc-${MONDO_VER}-r${rev}.tgz ${TOPDIR}/SOURCES/mondo-doc-${MONDO_VER}-r${rev}.tar.bz2"
45    rpms="$rpms ${TOPDIR}/RPMS/${ARCH}/mondo-doc-${MONDO_VER}-${rev}${suf}.${ARCH}.rpm"
46    srpms="$srpms ${TOPDIR}/SRPMS/mondo-${MONDO_VER}-${rev}${suf}.src.rpm"
47fi
48if [ "`echo $c | grep -v doc | grep mondo`" != "" ]; then
49    cp -a ${TOPDIR}/SOURCES/mondo-${MONDO_VER}.tgz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tgz
50    cp -a ${TOPDIR}/SOURCES/mondo-${MONDO_VER}.tar.bz2 ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tar.bz2
51    tgz="$tgz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tgz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tar.bz2"
52    rpms="$rpms ${TOPDIR}/RPMS/${ARCH}/mondo-${MONDO_VER}-${rev}${suf}.${ARCH}.rpm"
53    srpms="$srpms ${TOPDIR}/SRPMS/mondo-${MONDO_VER}-${rev}${suf}.src.rpm"
54fi
55echo "Sources delivery to ${ACCOUNT}:${DSTDIR}/src"
56scp ${tgz} ${ACCOUNT}:${DSTDIR}/src
57
58echo "Packages delivery to ${ACCOUNT}:${DSTDIR}/${ddir}/${dver}"
59ssh ${ACCOUNT} "mkdir -p ${DSTDIR}/${ddir}/${dver}"
60scp ${rpms} ${srpms} ${ACCOUNT}:${DSTDIR}/${ddir}/${dver}
61
62echo "Sources delivery to ${FTPSERV} ${FTPDIR}"
63if [ "`which ncftpput`" != "" ]; then
64    ncftpput ${FTPSERV} ${FTPDIR} ${tgz}
65elif [ "`which lftp`" != "" ]; then
66    lftp -e "cd ${FTPDIR} ; put ${tgz} ; quit" ${FTPSERV}
67fi
Note: See TracBrowser for help on using the repository browser.