source: trunk/tools/mkdeliv @ 561

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

merge -r 542:560 $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# Deliver RPMs packages and tgz files to ftp.mondorescue.org
4#
5# $Id: mkdeliv 561 2006-05-20 15:51:21Z 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/common-env
23. $TOOLHOME/svn-env
24. $TOOLHOME/rpm-env
25
26tgz=""
27srpms=""
28rpms=""
29rev=`$TOOLHOME/mksvnversion`
30
31if [ "$1" = "" ]; then
32        c="mondo-doc mindi mondo"
33else
34    c=$1
35fi
36if [ "`echo $c | grep mindi`" != "" ]; then
37    cp -a ${TOPDIR}/SOURCES/mindi-${MINDI_VER}.tgz ${TOPDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tgz
38    cp -a ${TOPDIR}/SOURCES/mindi-${MINDI_VER}.tar.bz2 ${TOPDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tar.bz2
39    tgz="$tgz ${TOPDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tgz ${TOPDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tar.bz2"
40    rpms="$rpms ${TOPDIR}/RPMS/${ARCH}/mindi-${MINDI_VER}-${rev}${suf}.${ARCH}.rpm"
41    srpms="$srpms ${TOPDIR}/SRPMS/mindi-${MINDI_VER}-${rev}${suf}.src.rpm"
42fi
43if [ "`echo $c | grep mondo-doc`" != "" ]; then
44    cp -a ${TOPDIR}/SOURCES/mondo-doc-${MONDO_VER}.tgz ${TOPDIR}/SOURCES/mondo-doc-${MONDO_VER}-r${rev}.tgz
45    cp -a ${TOPDIR}/SOURCES/mondo-doc-${MONDO_VER}.tar.bz2 ${TOPDIR}/SOURCES/mondo-doc-${MONDO_VER}-r${rev}.tar.bz2
46    tgz="$tgz ${TOPDIR}/SOURCES/mondo-doc-${MONDO_VER}-r${rev}.tgz ${TOPDIR}/SOURCES/mondo-doc-${MONDO_VER}-r${rev}.tar.bz2"
47    rpms="$rpms ${TOPDIR}/RPMS/${ARCH}/mondo-doc-${MONDO_VER}-${rev}${suf}.${ARCH}.rpm"
48    srpms="$srpms ${TOPDIR}/SRPMS/mondo-${MONDO_VER}-${rev}${suf}.src.rpm"
49fi
50if [ "`echo $c | grep -v doc | grep mondo`" != "" ]; then
51    cp -a ${TOPDIR}/SOURCES/mondo-${MONDO_VER}.tgz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tgz
52    cp -a ${TOPDIR}/SOURCES/mondo-${MONDO_VER}.tar.bz2 ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tar.bz2
53    tgz="$tgz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tgz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tar.bz2"
54    rpms="$rpms ${TOPDIR}/RPMS/${ARCH}/mondo-${MONDO_VER}-${rev}${suf}.${ARCH}.rpm"
55    srpms="$srpms ${TOPDIR}/SRPMS/mondo-${MONDO_VER}-${rev}${suf}.src.rpm"
56fi
57echo "Sources delivery to ${ACCOUNT}:${DSTDIR}/src"
58scp ${tgz} ${ACCOUNT}:${DSTDIR}/src
59
60echo "Packages delivery to ${ACCOUNT}:${DSTDIR}/${ddir}/${dver}"
61ssh ${ACCOUNT} "mkdir -p ${DSTDIR}/${ddir}/${dver}"
62scp ${rpms} ${srpms} ${ACCOUNT}:${DSTDIR}/${ddir}/${dver}
63
64echo "Sources delivery to ${FTPSERV} ${FTPDIR}"
65if [ "`which ncftpput`" != "" ]; then
66    ncftpput ${FTPSERV} ${FTPDIR} ${tgz}
67elif [ "`which lftp`" != "" ]; then
68    lftp -e "cd ${FTPDIR} ; put ${tgz} ; quit" ${FTPSERV}
69fi
Note: See TracBrowser for help on using the repository browser.