comparison crac-index-wrapper.sh @ 3:4cf2808854bc draft

Uploaded
author bonsai
date Fri, 13 Sep 2013 10:01:00 -0400
parents
children
comparison
equal deleted inserted replaced
2:dbb83adec9eb 3:4cf2808854bc
1 #!/bin/sh
2
3 # Recovering parameters from crac-index.xml
4 ###############################################################
5 CRAC_INDEX_BINARY=crac-index
6 BASE_FILENAME="$1"
7 HTML_REPORT="$2"
8 FILES_PATH="$3"
9 BUCKET="$4"
10
11 #echo Wrapper for crac-index
12 #echo running: $0 "$@"
13
14 shift 4
15
16 #echo After shifting, args are:
17 #echo "$@"
18
19 mkdir -p "$FILES_PATH"
20
21 # Execution of the command line (Submiting job to the cluster)
22 ###############################################################
23 CRAC_INDEX_CMD_LINE="$CRAC_INDEX_BINARY index "$FILES_PATH/$BASE_FILENAME" -b "$BUCKET" "$@""
24
25 out=`$CRAC_INDEX_CMD_LINE`
26
27 jID=`echo $out | awk {'print $3'}`
28 fi
29
30 cat << MARINE > "$HTML_REPORT"
31
32 exit 0
33
34 echo "<html>
35 <head>
36 <title>Files for Crac Index (crac_index)</title>
37 </head>
38 <body>
39 This index is composed of the following files:
40 <p/>
41 <ul>
42 <li><a href=""$BASE_FILENAME.conf"" type=""text/plain"">$BASE_FILENAME.conf</a></li>
43 <li><a href=""$BASE_FILENAME.ssa"" type=""application/binary"">$BASE_FILENAME.ssa</a></li>
44 </ul>
45 </body>
46 </html>" > "$HTML_REPORT"
47
48
49 MARINE
50