-
Notifications
You must be signed in to change notification settings - Fork 5
/
env.sh
executable file
·32 lines (24 loc) · 1.07 KB
/
env.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
#DYNEMOLWORKDIR="$(pwd)"
#export DYNEMOLWORKDIR
if [ $# -eq 0 ]
then
rm -r -f "$DYNEMOLWORKDIR"/dyn.trunk 2> "$DYNEMOLDIR"/qdynamo.err
mkdir "$DYNEMOLWORKDIR"/dyn.trunk
rm -r -f "$DYNEMOLWORKDIR"/dos.trunk 2> "$DYNEMOLDIR"/qdynamo.err
mkdir "$DYNEMOLWORKDIR"/dos.trunk
rm -r -f "$DYNEMOLWORKDIR"/MO.trunk 2> "$DYNEMOLDIR"/qdynamo.err
mkdir "$DYNEMOLWORKDIR"/MO.trunk
mkdir "$DYNEMOLWORKDIR"/opt.trunk 2> "$DYNEMOLDIR"/qdynamo.err
mv "$DYNEMOLWORKDIR"/opt.trunk/ga_cost.statement opt.trunk/old_ga_cost.statement 2> "$DYNEMOLDIR"/qdynamo.err
rm -r -f "$DYNEMOLWORKDIR"/log.trunk 2> "$DYNEMOLDIR"/qdynamo.err
mkdir "$DYNEMOLWORKDIR"/log.trunk
rm -r -f "$DYNEMOLWORKDIR"/ancillary.trunk 2> "$DYNEMOLDIR"/qdynamo.err
mkdir "$DYNEMOLWORKDIR"/ancillary.trunk
mkdir "$DYNEMOLWORKDIR"/ancillary.trunk/configs
fi
if [ "x$1" == 'xsave_cost_statement' ]
then
paste "$DYNEMOLWORKDIR"/opt.trunk/view_cost.dat <(grep "eval(me)" "$DYNEMOLDIR"/cost_tuning_EH.f | grep -v \!) > "$DYNEMOLWORKDIR"/opt.trunk/ga_cost.statement
rm "$DYNEMOLWORKDIR"/opt.trunk/view_cost.dat
fi