commit | author | age
|
39ff57
|
1 |
#!/bin/bash |
SP |
2 |
|
|
3 |
#This part is a configuration part of trisurf deploy |
|
4 |
|
|
5 |
|
|
6 |
#definition of tapes |
|
7 |
declare -a tapes=("tape1" "tape2" "tape3" "tape4"); |
|
8 |
|
|
9 |
#what options from tape should be overriden |
|
10 |
declare -a tape_overrides=("xk0=10" "constvol=2,xk=20" "" ""); |
|
11 |
|
|
12 |
#some extra options for program execution |
|
13 |
declare -a extra_options=("--force-from-tape" "--reset-iteration-count" "" ""); |
|
14 |
|
|
15 |
#main directory |
|
16 |
declare directory="/home/samo/trisurfanje" |
|
17 |
|
|
18 |
#subdirectory structure |
|
19 |
function subdir() { |
|
20 |
|
978e52
|
21 |
echo "ABC"; |
39ff57
|
22 |
} |
SP |
23 |
|
|
24 |
|
|
25 |
#End of configuration |
|
26 |
|
|
27 |
declare tape_no=${#tapes[@]} |
|
28 |
for i in `seq 1 $tape_no`; do |
978e52
|
29 |
declare sdir=$(subdir) |
SP |
30 |
declare dir_struct="$directory/$sdir" |
|
31 |
#if doesnt exist |
|
32 |
echo "mkdir $dir_struct" |
|
33 |
#if doesnt exist |
|
34 |
echo "cp ${tapes[i-1]} $dir_struct" |
|
35 |
|
|
36 |
|
|
37 |
echo "trisurf -t ${tapes[i-1]} -d $dir_struct -o ${tape_overrides[i-1]} ${extra_options[i-1]}" |
39ff57
|
38 |
done; |
SP |
39 |
|
|
40 |
|
|
41 |
#Functions required for operation |
|
42 |
|
|
43 |
|
|
44 |
echo "Deploying configuration of trisurf" |
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|