source: trunk/tools/mkdeliv @ 518

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

merge -r435:447 $SVN_M/branches/stable

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 2.0 KB
RevLine 
[20]1#!/bin/bash
2#
[404]3# Deliver RPMs packages and tgz files to ftp.mondorescue.org
[33]4#
5# $Id: mkdeliv 448 2006-03-20 21:24:29Z bcornec $
6#
[20]7
[320]8# BerliOS FTP/SSH setup
[404]9ACCOUNT=bruno@ftp.mondorescue.org
[448]10DSTDIR=/mondo/ftp
[320]11FTPSERV="ftp.berlios.de"
12FTPDIR="/incoming"
13
[33]14dname=`dirname $0`
15prem=`echo $dname |cut -c1`
16if [ ${prem} == "/" ]; then
17        export TOOLHOME=$dname
18else
19    export TOOLHOME=${PWD}/$dname
20fi
[20]21
[33]22. $TOOLHOME/rpm-env
23
[20]24tgz=""
25srpms=""
26rpms=""
[33]27rev=`$TOOLHOME/mksvnversion`
[20]28
29if [ "$1" = "" ]; then
30    c="mindi mondo"
31else
32    c=$1
33fi
34if [ "`echo $c | grep mindi`" != "" ]; then
[33]35    cp -a ${TOPDIR}/SOURCES/mindi-${MINDI_VER}.tgz ${TOPDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tgz
[55]36    cp -a ${TOPDIR}/SOURCES/mindi-${MINDI_VER}.tar.bz2 ${TOPDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tar.bz2
[51]37    tgz="$tgz ${TOPDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tgz ${TOPDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tar.bz2"
[337]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"
[20]40fi
41if [ "`echo $c | grep  mondo`" != "" ]; then
[33]42    cp -a ${TOPDIR}/SOURCES/mondo-${MONDO_VER}.tgz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tgz
[55]43    cp -a ${TOPDIR}/SOURCES/mondo-${MONDO_VER}.tar.bz2 ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tar.bz2
[51]44    tgz="$tgz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tgz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tar.bz2"
[337]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"
[20]47fi
[404]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
[98]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.