source: MondoRescue/branches/stable/tools/file2ftp@ 755

Last change on this file since 755 was 755, checked in by Bruno Cornec, 18 years ago
  • Use _defaultdocdir instead of RPM_DOC_DIR for doc built
  • %doc in spec files reviewed
  • Log file for all build scripts
  • Fix a bug for ebuild
  • src file is now name-verion.tar.gz (without TAG)
  • deb pkgs should now be copied on ftp server
  • Fix 2 warnings in mondo
  • Fix a bug introduced for LVM on Debian hopefully
  • Fix a bug on old distros where mktemp needs a template
  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
1#!/bin/bash
2#
3# Deliver tgz files to ftp.mondorescue.org
4#
5# $Id: file2ftp 755 2006-08-06 23:15:58Z bruno $
6#
7
8exec > /tmp/file2ftp.log 2>&1
9
10dname=`dirname $0`
11prem=`echo $dname |cut -c1`
12if [ ${prem} == "/" ]; then
13 export TOOLHOME=$dname
14else
15 export TOOLHOME=${PWD}/$dname
16fi
17
18. $TOOLHOME/common-env
19. $TOOLHOME/distro-env
20. $TOOLHOME/ftp-env
21
22# We need to get $VER and $TAG
23if [ "$1" = "" ]; then
24 LAST=`cat ${TOPDIR}/LAST`
25else
26 LAST=$1
27 shift
28fi
29VER=`echo $LAST | cut -d- -f1`
30TAG=`echo $LAST | cut -d- -f2`
31echo "Working on ${VER}-$TAG"
32
33if [ "$1" = "" ]; then
34 c="mondo-doc mindi mondo"
35else
36 if [ "$1" = "all" ]; then
37 c="mindi-kernel mondo-doc mindi mondo"
38 else
39 c=$1
40 fi
41fi
42
43export src=""
44echo "Working under $TOPBUILDDIR"
45cd $TOPBUILDDIR
46
47for p in $c; do
48 src="$src ${TOPDIR}/${VER}-$TAG/$p-[1-9st]*.tar.gz"
49done
50
51echo "Sources delivery to ${ACCOUNT}:${DSTDIR}/src"
52scp -p ${src} ${ACCOUNT}:${DSTDIR}/src
53
54echo "Sources delivery to ${FTPSERV} ${FTPDIR}"
55if [ "`which ncftpput`" != "" ]; then
56 ncftpput ${FTPSERV} ${FTPDIR} ${src}
57elif [ "`which lftp`" != "" ]; then
58 lftp -e "cd ${FTPDIR} ; put ${src} ; quit" ${FTPSERV}
59fi
Note: See TracBrowser for help on using the repository browser.