9 |
# Exit codes (<0 informational) |
# Exit codes (<0 informational) |
10 |
# -1 (255): no new CCF deliveries |
# -1 (255): no new CCF deliveries |
11 |
# |
# |
12 |
# $Id: getdeliveries,v 1.4 2000/08/28 12:27:27 ccflib Exp $ |
# $Id: getdeliveries,v 1.2 2002/02/19 13:57:04 ccflib Exp $ |
13 |
|
|
14 |
|
set -e |
15 |
|
|
16 |
cleanup () { |
cleanup () { |
17 |
cd ~ |
cd ~ |
21 |
me=`basename $0` |
me=`basename $0` |
22 |
##echo $me running at `date` |
##echo $me running at `date` |
23 |
|
|
24 |
server=astro |
uploaddir=/ccf/private/incoming |
25 |
uploaddir=/usr4/users/ftp/pub/ccflib/private/incoming |
uploaddir=~/incoming |
26 |
pkgdir=~/deliveries/packages |
pkgdir=~/deliveries/packages |
27 |
builtdir=~/deliveries/built |
builtdir=~/deliveries/built |
28 |
rejdir=~/deliveries/rejected |
rejdir=~/deliveries/rejected |
35 |
cd $pkgdir |
cd $pkgdir |
36 |
DATE=`date '+%Y%m%d'` |
DATE=`date '+%Y%m%d'` |
37 |
|
|
38 |
rcp -r gvacanti@$server:$uploaddir/* $tmpdir/ 2> /dev/null |
cp $uploaddir/* $tmpdir/ 2> /dev/null |
39 |
|
|
40 |
cd $tmpdir |
cd $tmpdir |
41 |
|
|
88 |
|
|
89 |
if [ $discard -eq 1 ] ; then |
if [ $discard -eq 1 ] ; then |
90 |
echo $p removed from upload area |
echo $p removed from upload area |
91 |
rsh -l gvacanti $server "/bin/rm -f $uploaddir/$p" |
rm -f $uploaddir/$p |
92 |
fi |
fi |
93 |
|
|
94 |
done |
done |