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