source: branches/2.0.7/tools/mkdeliv @ 439

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

DSTDIR in now correct for ftp delivery

  • 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 ftp.mondorescue.org
4#
5# $Id: mkdeliv 439 2006-03-13 08:49:22Z 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="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 ${ACCOUNT}:${DSTDIR}/src"
49scp ${tgz} ${ACCOUNT}:${DSTDIR}/src
50
51echo "Packages delivery to ${ACCOUNT}:${DSTDIR}/${ddir}/${dver}"
52ssh ${ACCOUNT} "mkdir -p ${DSTDIR}/${ddir}/${dver}"
53scp ${rpms} ${srpms} ${ACCOUNT}:${DSTDIR}/${ddir}/${dver}
54
55echo "Sources delivery to ${FTPSERV} ${FTPDIR}"
56if [ "`which ncftpput`" != "" ]; then
57    ncftpput ${FTPSERV} ${FTPDIR} ${tgz}
58elif [ "`which lftp`" != "" ]; then
59    lftp -e "cd ${FTPDIR} ; put ${tgz} ; quit" ${FTPSERV}
60fi
Note: See TracBrowser for help on using the repository browser.