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.1 2002/02/18 20:23:57 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 |
|
uploaddir=/usr4/users/ftp/pub/ccflib/private/incoming |
|
25 |
pkgdir=~/deliveries/packages |
pkgdir=~/deliveries/packages |
26 |
builtdir=~/deliveries/built |
builtdir=~/deliveries/built |
27 |
rejdir=~/deliveries/rejected |
rejdir=~/deliveries/rejected |
34 |
cd $pkgdir |
cd $pkgdir |
35 |
DATE=`date '+%Y%m%d'` |
DATE=`date '+%Y%m%d'` |
36 |
|
|
37 |
rcp -r gvacanti@$server:$uploaddir/* $tmpdir/ 2> /dev/null |
cp $uploaddir/* $tmpdir/ 2> /dev/null |
38 |
|
|
39 |
cd $tmpdir |
cd $tmpdir |
40 |
|
|
87 |
|
|
88 |
if [ $discard -eq 1 ] ; then |
if [ $discard -eq 1 ] ; then |
89 |
echo $p removed from upload area |
echo $p removed from upload area |
90 |
rsh -l gvacanti $server "/bin/rm -f $uploaddir/$p" |
rm -f $uploaddir/$p |
91 |
fi |
fi |
92 |
|
|
93 |
done |
done |