Changeset 590


Ignore:
Timestamp:
May 29, 2006, 1:14:31 PM (13 years ago)
Author:
bcornec
Message:

Delivery process coded:
file2ftp to deliver tar.gz files
pkg2ftp to deliver packages (RPMs only currently)

Location:
branches/stable/tools
Files:
1 added
1 edited
1 copied
1 moved

Legend:

Unmodified
Added
Removed
  • branches/stable/tools/distro-env

    r573 r590  
    2929        else
    3030            export ddir="redhat"
    31             export dver=`awk '{print $5}' /etc/redhat-release | sed "s/\.//"`
     31            export dver=`awk '{print $5}' /etc/redhat-release`
    3232        fi
    3333    elif [ -e /etc/SuSE-release ]; then
     
    3737            export dver=`head -1 /etc/SuSE-release | awk '{print $5}'`
    3838        else
    39                             export ddir="suse"
     39            export ddir="suse"
    4040            export dver=`head -1 /etc/SuSE-release | awk '{print $3}'`
    4141        fi
  • branches/stable/tools/file2ftp

    r589 r590  
    11#!/bin/bash
    22#
    3 # Deliver packages and tgz files to ftp.mondorescue.org
     3# Deliver tgz files to ftp.mondorescue.org
    44#
    55# $Id$
    66#
    7 
    8 # BerliOS FTP/SSH setup
    9 ACCOUNT=bruno@ftp.mondorescue.org
    10 DSTDIR=/mondo/ftp
    11 FTPSERV="ftp.berlios.de"
    12 FTPDIR="/incoming"
    137
    148dname=`dirname $0`
     
    2216. $TOOLHOME/common-env
    2317. $TOOLHOME/distro-env
     18. $TOOLHOME/ftp-env
    2419
    2520# We need to get $VER and $TAG
     
    4439fi
    4540
    46 export pkg=""
     41export src=""
    4742echo "Working under $TOPBUILDDIR"
    4843cd $TOPBUILDDIR
    4944
    5045for p in $c; do
     46    src="$src ${TOPDIR}/${VER}-$TAG/$p-[1-9st]*.tar.gz"
     47done
    5148
    52 tgz=""
    53 srpms=""
    54 rpms=""
    55 
    56 if [ "`echo $c | grep mindi`" != "" ]; then
    57     cp -a ${TOPBUILDDIR}/SOURCES/mindi-${MINDI_VER}.tgz ${TOPBUILDDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tgz
    58     cp -a ${TOPBUILDDIR}/SOURCES/mindi-${MINDI_VER}.tar.bz2 ${TOPBUILDDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tar.bz2
    59     tgz="$tgz ${TOPBUILDDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tgz ${TOPBUILDDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tar.bz2"
    60     rpms="$rpms ${TOPBUILDDIR}/RPMS/${ARCH}/mindi-${MINDI_VER}-${rev}${suf}.${ARCH}.rpm"
    61     srpms="$srpms ${TOPBUILDDIR}/SRPMS/mindi-${MINDI_VER}-${rev}${suf}.src.rpm"
    62 fi
    63 if [ "`echo $c | grep mondo-doc`" != "" ]; then
    64     cp -a ${TOPBUILDDIR}/SOURCES/mondo-doc-${MONDO_VER}.tgz ${TOPBUILDDIR}/SOURCES/mondo-doc-${MONDO_VER}-r${rev}.tgz
    65     cp -a ${TOPBUILDDIR}/SOURCES/mondo-doc-${MONDO_VER}.tar.bz2 ${TOPBUILDDIR}/SOURCES/mondo-doc-${MONDO_VER}-r${rev}.tar.bz2
    66     tgz="$tgz ${TOPBUILDDIR}/SOURCES/mondo-doc-${MONDO_VER}-r${rev}.tgz ${TOPBUILDDIR}/SOURCES/mondo-doc-${MONDO_VER}-r${rev}.tar.bz2"
    67     rpms="$rpms ${TOPBUILDDIR}/RPMS/${ARCH}/mondo-doc-${MONDO_VER}-${rev}${suf}.${ARCH}.rpm"
    68     srpms="$srpms ${TOPBUILDDIR}/SRPMS/mondo-${MONDO_VER}-${rev}${suf}.src.rpm"
    69 fi
    70 if [ "`echo $c | grep -v doc | grep mondo`" != "" ]; then
    71     cp -a ${TOPBUILDDIR}/SOURCES/mondo-${MONDO_VER}.tgz ${TOPBUILDDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tgz
    72     cp -a ${TOPBUILDDIR}/SOURCES/mondo-${MONDO_VER}.tar.bz2 ${TOPBUILDDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tar.bz2
    73     tgz="$tgz ${TOPBUILDDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tgz ${TOPBUILDDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tar.bz2"
    74     rpms="$rpms ${TOPBUILDDIR}/RPMS/${ARCH}/mondo-${MONDO_VER}-${rev}${suf}.${ARCH}.rpm"
    75     srpms="$srpms ${TOPBUILDDIR}/SRPMS/mondo-${MONDO_VER}-${rev}${suf}.src.rpm"
    76 fi
    7749echo "Sources delivery to ${ACCOUNT}:${DSTDIR}/src"
    78 scp ${tgz} ${ACCOUNT}:${DSTDIR}/src
    79 
    80 echo "Packages delivery to ${ACCOUNT}:${DSTDIR}/${ddir}/${dver}"
    81 ssh ${ACCOUNT} "mkdir -p ${DSTDIR}/${ddir}/${dver}"
    82 scp ${rpms} ${srpms} ${ACCOUNT}:${DSTDIR}/${ddir}/${dver}
     50scp -p ${src} ${ACCOUNT}:${DSTDIR}/src
    8351
    8452echo "Sources delivery to ${FTPSERV} ${FTPDIR}"
    8553if [ "`which ncftpput`" != "" ]; then
    86     ncftpput ${FTPSERV} ${FTPDIR} ${tgz}
     54    ncftpput ${FTPSERV} ${FTPDIR} ${src}
    8755elif [ "`which lftp`" != "" ]; then
    88     lftp -e "cd ${FTPDIR} ; put ${tgz} ; quit" ${FTPSERV}
     56    lftp -e "cd ${FTPDIR} ; put ${src} ; quit" ${FTPSERV}
    8957fi
  • branches/stable/tools/pkg2ftp

    r589 r590  
    55# $Id$
    66#
    7 
    8 # BerliOS FTP/SSH setup
    9 ACCOUNT=bruno@ftp.mondorescue.org
    10 DSTDIR=/mondo/ftp
    11 FTPSERV="ftp.berlios.de"
    12 FTPDIR="/incoming"
    137
    148dname=`dirname $0`
     
    2216. $TOOLHOME/common-env
    2317. $TOOLHOME/distro-env
     18. $TOOLHOME/ftp-env
    2419
    2520# We need to get $VER and $TAG
     
    4843cd $TOPBUILDDIR
    4944
     45spkg=""
     46pkg=""
     47
    5048for p in $c; do
    51 
    52 tgz=""
    53 srpms=""
    54 rpms=""
    55 
    56 if [ "`echo $c | grep mindi`" != "" ]; then
    57     cp -a ${TOPBUILDDIR}/SOURCES/mindi-${MINDI_VER}.tgz ${TOPBUILDDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tgz
    58     cp -a ${TOPBUILDDIR}/SOURCES/mindi-${MINDI_VER}.tar.bz2 ${TOPBUILDDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tar.bz2
    59     tgz="$tgz ${TOPBUILDDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tgz ${TOPBUILDDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tar.bz2"
    60     rpms="$rpms ${TOPBUILDDIR}/RPMS/${ARCH}/mindi-${MINDI_VER}-${rev}${suf}.${ARCH}.rpm"
    61     srpms="$srpms ${TOPBUILDDIR}/SRPMS/mindi-${MINDI_VER}-${rev}${suf}.src.rpm"
    62 fi
    63 if [ "`echo $c | grep mondo-doc`" != "" ]; then
    64     cp -a ${TOPBUILDDIR}/SOURCES/mondo-doc-${MONDO_VER}.tgz ${TOPBUILDDIR}/SOURCES/mondo-doc-${MONDO_VER}-r${rev}.tgz
    65     cp -a ${TOPBUILDDIR}/SOURCES/mondo-doc-${MONDO_VER}.tar.bz2 ${TOPBUILDDIR}/SOURCES/mondo-doc-${MONDO_VER}-r${rev}.tar.bz2
    66     tgz="$tgz ${TOPBUILDDIR}/SOURCES/mondo-doc-${MONDO_VER}-r${rev}.tgz ${TOPBUILDDIR}/SOURCES/mondo-doc-${MONDO_VER}-r${rev}.tar.bz2"
    67     rpms="$rpms ${TOPBUILDDIR}/RPMS/${ARCH}/mondo-doc-${MONDO_VER}-${rev}${suf}.${ARCH}.rpm"
    68     srpms="$srpms ${TOPBUILDDIR}/SRPMS/mondo-${MONDO_VER}-${rev}${suf}.src.rpm"
    69 fi
    70 if [ "`echo $c | grep -v doc | grep mondo`" != "" ]; then
    71     cp -a ${TOPBUILDDIR}/SOURCES/mondo-${MONDO_VER}.tgz ${TOPBUILDDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tgz
    72     cp -a ${TOPBUILDDIR}/SOURCES/mondo-${MONDO_VER}.tar.bz2 ${TOPBUILDDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tar.bz2
    73     tgz="$tgz ${TOPBUILDDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tgz ${TOPBUILDDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tar.bz2"
    74     rpms="$rpms ${TOPBUILDDIR}/RPMS/${ARCH}/mondo-${MONDO_VER}-${rev}${suf}.${ARCH}.rpm"
    75     srpms="$srpms ${TOPBUILDDIR}/SRPMS/mondo-${MONDO_VER}-${rev}${suf}.src.rpm"
    76 fi
    77 echo "Sources delivery to ${ACCOUNT}:${DSTDIR}/src"
    78 scp ${tgz} ${ACCOUNT}:${DSTDIR}/src
     49    # s= stable; t = trunk; 1-9 = official version
     50    src=${TOPDIR}/${VER}-$TAG/$p-[1-9st]*.tar.gz
     51    pv=`basename $src .tar.gz`
     52    if [  _"$dtype" = _"rpm" ]; then
     53        if [ _"$p" = _"mondo-doc" ]; then
     54            ar="noarch"
     55        else
     56            ar=$ARCH
     57        fi
     58        pkg="$pkg ${TOPBUILDDIR}/RPMS/${ar}/$pv${suf}.${ar}.rpm"
     59        spkg="$spkg ${TOPBUILDDIR}/SRPMS/$pv${suf}.src.rpm"
     60    fi
     61done
    7962
    8063echo "Packages delivery to ${ACCOUNT}:${DSTDIR}/${ddir}/${dver}"
    8164ssh ${ACCOUNT} "mkdir -p ${DSTDIR}/${ddir}/${dver}"
    82 scp ${rpms} ${srpms} ${ACCOUNT}:${DSTDIR}/${ddir}/${dver}
    83 
    84 echo "Sources delivery to ${FTPSERV} ${FTPDIR}"
    85 if [ "`which ncftpput`" != "" ]; then
    86     ncftpput ${FTPSERV} ${FTPDIR} ${tgz}
    87 elif [ "`which lftp`" != "" ]; then
    88     lftp -e "cd ${FTPDIR} ; put ${tgz} ; quit" ${FTPSERV}
    89 fi
     65scp ${pkg} ${spkg} ${ACCOUNT}:${DSTDIR}/${ddir}/${dver}
Note: See TracChangeset for help on using the changeset viewer.