Changeset 590 in MondoRescue
- Timestamp:
- May 29, 2006, 1:14:31 PM (18 years ago)
- Location:
- branches/stable/tools
- Files:
-
- 1 added
- 1 edited
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/tools/distro-env
r573 r590 29 29 else 30 30 export ddir="redhat" 31 export dver=`awk '{print $5}' /etc/redhat-release | sed "s/\.//"`31 export dver=`awk '{print $5}' /etc/redhat-release` 32 32 fi 33 33 elif [ -e /etc/SuSE-release ]; then … … 37 37 export dver=`head -1 /etc/SuSE-release | awk '{print $5}'` 38 38 else 39 39 export ddir="suse" 40 40 export dver=`head -1 /etc/SuSE-release | awk '{print $3}'` 41 41 fi -
branches/stable/tools/file2ftp
r589 r590 1 1 #!/bin/bash 2 2 # 3 # Deliver packages andtgz files to ftp.mondorescue.org3 # Deliver tgz files to ftp.mondorescue.org 4 4 # 5 5 # $Id$ 6 6 # 7 8 # BerliOS FTP/SSH setup9 ACCOUNT=bruno@ftp.mondorescue.org10 DSTDIR=/mondo/ftp11 FTPSERV="ftp.berlios.de"12 FTPDIR="/incoming"13 7 14 8 dname=`dirname $0` … … 22 16 . $TOOLHOME/common-env 23 17 . $TOOLHOME/distro-env 18 . $TOOLHOME/ftp-env 24 19 25 20 # We need to get $VER and $TAG … … 44 39 fi 45 40 46 export pkg=""41 export src="" 47 42 echo "Working under $TOPBUILDDIR" 48 43 cd $TOPBUILDDIR 49 44 50 45 for p in $c; do 46 src="$src ${TOPDIR}/${VER}-$TAG/$p-[1-9st]*.tar.gz" 47 done 51 48 52 tgz=""53 srpms=""54 rpms=""55 56 if [ "`echo $c | grep mindi`" != "" ]; then57 cp -a ${TOPBUILDDIR}/SOURCES/mindi-${MINDI_VER}.tgz ${TOPBUILDDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tgz58 cp -a ${TOPBUILDDIR}/SOURCES/mindi-${MINDI_VER}.tar.bz2 ${TOPBUILDDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tar.bz259 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 fi63 if [ "`echo $c | grep mondo-doc`" != "" ]; then64 cp -a ${TOPBUILDDIR}/SOURCES/mondo-doc-${MONDO_VER}.tgz ${TOPBUILDDIR}/SOURCES/mondo-doc-${MONDO_VER}-r${rev}.tgz65 cp -a ${TOPBUILDDIR}/SOURCES/mondo-doc-${MONDO_VER}.tar.bz2 ${TOPBUILDDIR}/SOURCES/mondo-doc-${MONDO_VER}-r${rev}.tar.bz266 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 fi70 if [ "`echo $c | grep -v doc | grep mondo`" != "" ]; then71 cp -a ${TOPBUILDDIR}/SOURCES/mondo-${MONDO_VER}.tgz ${TOPBUILDDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tgz72 cp -a ${TOPBUILDDIR}/SOURCES/mondo-${MONDO_VER}.tar.bz2 ${TOPBUILDDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tar.bz273 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 fi77 49 echo "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} 50 scp -p ${src} ${ACCOUNT}:${DSTDIR}/src 83 51 84 52 echo "Sources delivery to ${FTPSERV} ${FTPDIR}" 85 53 if [ "`which ncftpput`" != "" ]; then 86 ncftpput ${FTPSERV} ${FTPDIR} ${ tgz}54 ncftpput ${FTPSERV} ${FTPDIR} ${src} 87 55 elif [ "`which lftp`" != "" ]; then 88 lftp -e "cd ${FTPDIR} ; put ${ tgz} ; quit" ${FTPSERV}56 lftp -e "cd ${FTPDIR} ; put ${src} ; quit" ${FTPSERV} 89 57 fi -
branches/stable/tools/pkg2ftp
r589 r590 5 5 # $Id$ 6 6 # 7 8 # BerliOS FTP/SSH setup9 ACCOUNT=bruno@ftp.mondorescue.org10 DSTDIR=/mondo/ftp11 FTPSERV="ftp.berlios.de"12 FTPDIR="/incoming"13 7 14 8 dname=`dirname $0` … … 22 16 . $TOOLHOME/common-env 23 17 . $TOOLHOME/distro-env 18 . $TOOLHOME/ftp-env 24 19 25 20 # We need to get $VER and $TAG … … 48 43 cd $TOPBUILDDIR 49 44 45 spkg="" 46 pkg="" 47 50 48 for 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 61 done 79 62 80 63 echo "Packages delivery to ${ACCOUNT}:${DSTDIR}/${ddir}/${dver}" 81 64 ssh ${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 65 scp ${pkg} ${spkg} ${ACCOUNT}:${DSTDIR}/${ddir}/${dver}
Note:
See TracChangeset
for help on using the changeset viewer.