Last change
on this file since 1412 was 1043, checked in by Bruno Cornec, 18 years ago |
merge -r978:1042 $SVN_M/branches/stable
|
-
Property svn:executable
set to
*
-
Property svn:keywords
set to
Id
|
File size:
1.2 KB
|
Rev | Line | |
---|
[20] | 1 | #!/bin/bash
|
---|
| 2 | #
|
---|
[590] | 3 | # Deliver tgz files to ftp.mondorescue.org
|
---|
[33] | 4 | #
|
---|
| 5 | # $Id: file2ftp 1043 2007-01-08 22:31:22Z bruno $
|
---|
| 6 | #
|
---|
[20] | 7 |
|
---|
[764] | 8 | (
|
---|
| 9 |
|
---|
[33] | 10 | dname=`dirname $0`
|
---|
| 11 | prem=`echo $dname |cut -c1`
|
---|
[1043] | 12 | if [ _${prem} = _"/" ]; then
|
---|
[932] | 13 | export TOOLHOME=$dname
|
---|
[33] | 14 | else
|
---|
| 15 | export TOOLHOME=${PWD}/$dname
|
---|
| 16 | fi
|
---|
[20] | 17 |
|
---|
[549] | 18 | . $TOOLHOME/common-env
|
---|
[589] | 19 | . $TOOLHOME/distro-env
|
---|
[590] | 20 | . $TOOLHOME/ftp-env
|
---|
[33] | 21 |
|
---|
[589] | 22 | # We need to get $VER and $TAG
|
---|
| 23 | if [ "$1" = "" ]; then
|
---|
| 24 | LAST=`cat ${TOPDIR}/LAST`
|
---|
| 25 | else
|
---|
| 26 | LAST=$1
|
---|
| 27 | shift
|
---|
| 28 | fi
|
---|
| 29 | VER=`echo $LAST | cut -d- -f1`
|
---|
| 30 | TAG=`echo $LAST | cut -d- -f2`
|
---|
| 31 | echo "Working on ${VER}-$TAG"
|
---|
| 32 |
|
---|
| 33 | if [ "$1" = "" ]; then
|
---|
[839] | 34 | c="mondo-doc mindi mindi-busybox mondo"
|
---|
[589] | 35 | else
|
---|
| 36 | if [ "$1" = "all" ]; then
|
---|
[839] | 37 | c="mindi-kernel mondo-doc mindi mindi-busybox mondo"
|
---|
[589] | 38 | else
|
---|
[932] | 39 | c="$*"
|
---|
[589] | 40 | fi
|
---|
| 41 | fi
|
---|
| 42 |
|
---|
[590] | 43 | export src=""
|
---|
[589] | 44 | echo "Working under $TOPBUILDDIR"
|
---|
| 45 | cd $TOPBUILDDIR
|
---|
| 46 |
|
---|
| 47 | for p in $c; do
|
---|
[764] | 48 | src1="${TOPDIR}/${VER}-$TAG/$p-[1-9st]*.tar.gz"
|
---|
| 49 | src2=`echo $src1 | sed 's/\.tar\.gz//'`
|
---|
| 50 | src="$src $src1 $src2.tar.bz2"
|
---|
[590] | 51 | done
|
---|
[589] | 52 |
|
---|
[764] | 53 |
|
---|
[402] | 54 | echo "Sources delivery to ${ACCOUNT}:${DSTDIR}/src"
|
---|
[590] | 55 | scp -p ${src} ${ACCOUNT}:${DSTDIR}/src
|
---|
[402] | 56 |
|
---|
[97] | 57 | echo "Sources delivery to ${FTPSERV} ${FTPDIR}"
|
---|
| 58 | if [ "`which ncftpput`" != "" ]; then
|
---|
[590] | 59 | ncftpput ${FTPSERV} ${FTPDIR} ${src}
|
---|
[97] | 60 | elif [ "`which lftp`" != "" ]; then
|
---|
[590] | 61 | lftp -e "cd ${FTPDIR} ; put ${src} ; quit" ${FTPSERV}
|
---|
[97] | 62 | fi
|
---|
[764] | 63 | ) 2>&1 | tee /tmp/file2ftp.log
|
---|
Note:
See
TracBrowser
for help on using the repository browser.