~maddevelopers/mg5amcnlo/WWW5_caching

« back to all changes in this revision

Viewing changes to users/mardelcourt/PROC_141512/PROC_141512/bin/internal/clean

  • Committer: John Doe
  • Date: 2013-03-25 20:27:02 UTC
  • Revision ID: john.doe@gmail.com-20130325202702-5sk3t1r8h33ca4p4
first clean version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
#
 
3
#  Cleans up directories removing leaving only the results
 
4
#     object files
 
5
#     executable files
 
6
#     events.dat   (Except in Events)
 
7
#
 
8
#  Usage: clean
 
9
#
 
10
#  
 
11
#   First we need to get into the main directory
 
12
#
 
13
if [[  ! -d ./bin  ]]; then
 
14
    cd ../
 
15
    if [[ ! -d ./bin ]]; then
 
16
        echo "Error: survey must be executed from the main, or bin directory"
 
17
        exit
 
18
    fi
 
19
fi
 
20
if [[ -d SubProcesses ]]; then
 
21
    cd SubProcesses
 
22
    echo -n "Cleaning  SubProcesses"
 
23
    for i in `cat subproc.mg` ; do
 
24
        cd $i
 
25
        echo -n "."
 
26
        rm -f *ajob* >& /dev/null
 
27
        rm -f G*/ftn* >& /dev/null
 
28
        rm -f G*/events.lhe >& /dev/null
 
29
        cd ..
 
30
    done
 
31
    echo " "
 
32
    cd ../
 
33
else
 
34
    echo "Error could not find SubProcesses"
 
35
    exit
 
36
fi