source: MondoRescue/branches/stable/tools/mkdeliv@ 541

Last change on this file since 541 was 541, checked in by bcornec, 19 years ago

Stable is reverted to r436 (2.0.7) to put it in line with 2.0.8 and start from there over

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.9 KB
RevLine 
[20]1#!/bin/bash
2#
[399]3# Deliver RPMs packages and tgz files to ftp.mondorescue.org
[33]4#
5# $Id: mkdeliv 541 2006-05-13 18:47:23Z bcornec $
6#
[20]7
[319]8# BerliOS FTP/SSH setup
[402]9ACCOUNT=bruno@ftp.mondorescue.org
[541]10DSTDIR=/
[319]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
[541]30 c="mindi mondo"
[20]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
[54]36 cp -a ${TOPDIR}/SOURCES/mindi-${MINDI_VER}.tar.bz2 ${TOPDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tar.bz2
[50]37 tgz="$tgz ${TOPDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tgz ${TOPDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tar.bz2"
[336]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
[541]41if [ "`echo $c | grep mondo`" != "" ]; then
[33]42 cp -a ${TOPDIR}/SOURCES/mondo-${MONDO_VER}.tgz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tgz
[54]43 cp -a ${TOPDIR}/SOURCES/mondo-${MONDO_VER}.tar.bz2 ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tar.bz2
[50]44 tgz="$tgz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tgz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tar.bz2"
[336]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
[402]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
[97]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.