ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/JOBROBOT/cleanBadProjects.sh
Revision: 1.1
Committed: Wed Aug 2 16:46:50 2006 UTC (18 years, 9 months ago) by gutsche
Content type: application/x-sh
Branch: MAIN
CVS Tags: JOBROBOT_1_0006
Log Message:
clean bad projects after 2 days

File Contents

# User Rev Content
1 gutsche 1.1 #!/bin/bash
2    
3     # script which removes bad projects from the prep, submit and collect queues
4     #
5     # has to be executed in the src directory of the CMSSW project directory
6     #
7     # required parameter: day <YYMMDD>
8     #
9     # cleanBadProjects.sh 060802
10     #
11    
12     if [ $# -lt 1 ]; then
13     echo "Please provide day as a parameter in format YYMMDD"
14     exit 1
15     fi
16    
17     echo ""
18     echo "Cleaning bad projects from the prep, submit and collect queues for $1"
19     echo ""
20    
21     # prep
22     prepsearchstring=`echo "*prep*$1*"`
23     prepfiles=`find . -path $prepsearchstring -name bad`
24     for prepfile in $prepfiles
25     do
26     prepdir=`echo $prepfile | sed -e s/'\/bad'//`
27     echo "remove $prepdir"
28     rm -rf $prepdir
29     done
30    
31     # submit
32     submitsearchstring=`echo "*submit*$1*"`
33     submitfiles=`find . -path $submitsearchstring -name bad`
34     for submitfile in $submitfiles
35     do
36     submitdir=`echo $submitfile | sed -e s/'\/bad'//`
37     echo "remove $submitdir"
38     rm -rf $submitdir
39     done
40    
41     # collect
42     collectsearchstring=`echo "*collect*$1*"`
43     collectfiles=`find . -path $collectsearchstring -name bad`
44     for collectfile in $collectfiles
45     do
46     collectdir=`echo $collectfile | sed -e s/'\/bad'//`
47     echo "remove $collectdir"
48     rm -rf $collectdir
49     done
50    
51     echo ""
52     echo "remaining projects in prep, submit and collect queues after cleanup for $1"
53     echo ""
54    
55     # prep
56     prepsearchstring=`echo "*prep*$1*"`
57     prepsearchstring2=`echo "*$1*"`
58     prepdirs=`find . -path $prepsearchstring -name $prepsearchstring2`
59     for prepdir in $prepdirs
60     do
61     echo "$prepdir"
62     done
63    
64     # submit
65     submitsearchstring=`echo "*submit*$1*"`
66     submitsearchstring2=`echo "*$1*"`
67     submitdirs=`find . -path $submitsearchstring -name $submitsearchstring2`
68     for submitdir in $submitdirs
69     do
70     echo "$submitdir"
71     done
72    
73     # collect
74     collectsearchstring=`echo "*collect*$1*"`
75     collectsearchstring2=`echo "*$1*"`
76     collectdirs=`find . -path $collectsearchstring -name $collectsearchstring2`
77     for collectdir in $collectdirs
78     do
79     echo "$collectdir"
80     done
81