/[CCFs]/bin/getdeliveries
ViewVC logotype

Diff of /bin/getdeliveries

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by ccflib, Wed Nov 26 13:22:15 2003 UTC revision 1.6 by ccflib, Mon Jan 15 09:58:17 2018 UTC
# Line 1  Line 1 
1  #!/usr/local/bin/bash  #!/bin/bash
 #  
 # Giuseppe Vacanti, January 2000  
2  #  #
3  # + fetch CCF deliveries from the ftp site  # + fetch CCF deliveries from the ftp site
4  # + perform basic checks on the packages  # + perform basic checks on the packages
# Line 9  Line 7 
7  # Exit codes (<0 informational)  # Exit codes (<0 informational)
8  #  -1 (255): no new CCF deliveries  #  -1 (255): no new CCF deliveries
9  #  #
10  #       $Id: getdeliveries,v 1.3 2003/11/26 10:51:05 ccflib Exp $        # $Id: getdeliveries,v 1.5 2014/12/02 14:47:48 ccflib Exp $    
11    
12  set -e  #set -e (if set it will not produce any output)
13    
14  cleanup () {  cleanup () {
15    cd ~    cd ~
# Line 19  cleanup () { Line 17  cleanup () {
17  }  }
18    
19  me=`basename $0`  me=`basename $0`
 ##echo $me running at `date`  
20    
21  # uploaddir=/ccf/private/incoming  echo
22    echo "-> $me running at "`date`
23    echo
24    
25  uploaddir=~/incoming  uploaddir=~/incoming
26  pkgdir=~/deliveries/packages  pkgdir=~/deliveries/packages
27  builtdir=~/deliveries/built  builtdir=~/deliveries/built
# Line 32  logfile=~/deliveries/DELIVERY_LOG Line 32  logfile=~/deliveries/DELIVERY_LOG
32  trap cleanup EXIT  trap cleanup EXIT
33    
34  mkdir -p $tmpdir $pkgdir $rejdir  mkdir -p $tmpdir $pkgdir $rejdir
35    
36  cd $pkgdir  cd $pkgdir
37    
38  DATE=`date '+%Y%m%d'`  DATE=`date '+%Y%m%d'`
39    
40  cp $uploaddir/* $tmpdir/ 2> /dev/null  cp $uploaddir/* $tmpdir/ 2> /dev/null
# Line 40  cp $uploaddir/* $tmpdir/ 2> /dev/null Line 42  cp $uploaddir/* $tmpdir/ 2> /dev/null
42  cd $tmpdir  cd $tmpdir
43    
44  flist=`ls *.tgz 2> /dev/null`  flist=`ls *.tgz 2> /dev/null`
45    
46  if [ -z "$flist" ] ; then  if [ -z "$flist" ] ; then
47  ##  echo No new CCF deliveries.    echo "$me: No new CCF deliveries."
48      echo  
49    exit -1    exit -1
50  fi  fi
51    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.27