-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRunMultipleDemos.sh
More file actions
executable file
·52 lines (44 loc) · 1.01 KB
/
RunMultipleDemos.sh
File metadata and controls
executable file
·52 lines (44 loc) · 1.01 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/bash
directory="."
script="DemoEASimple.py"
execution="."
py="python"
Help()
{
echo "Run multiple tests using multiple config files"
echo
echo "Syntax: scriptTemplate [-g|h|v|V]"
echo "options:"
echo "e Execution directory"
echo "s Script path relative to execution directory"
echo "d Config file directory relative to execution directory"
echo "-p Python version to use"
echo
}
while getopts d:s:e:p:h: flag
do
case "${flag}" in
e) execution=${OPTARG};;
s) script=${OPTARG};;
d) directory=${OPTARG};;
p) py=${OPTARG};;
h) Help
exit;;
esac
done
echo "Running script: $script"
echo "In execution directory: $execution"
echo "Using configs in: $directory"
script=${script//[\/]/.}
script=${script::-3}
echo $script
cd $execution
echo "Moved to $execution for execution"
echo "Script dir"
echo $directory
for f in $directory/*.cfg
do
command="$py -m $script --config $f"
echo $command
eval " $command" || true
done