-
Notifications
You must be signed in to change notification settings - Fork 2
/
makedocker
39 lines (39 loc) · 1.03 KB
/
makedocker
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
#!/bin/bash
if [ $# == 0 ]
then
echo "Make a concore study in docker"
echo " ./makedocker path/name.graphml"
echo " ./makedocker path/name.graphml study"
echo "In the first case, the name of the study is the same as the name of the .graphml"
echo "In either case, source files come from the same path as the .graphml"
echo "The equivalent mkconcore.py is displayed"
exit
fi
graphml=$1
if [ -e $graphml ]
then
sourcedir=$(dirname "$graphml")
else
graphml=$graphml'.graphml'
if [ -e $graphml ]
then
sourcedir=$(dirname "$graphml")
else
echo "$graphml does not exist"
exit
fi
fi
if [ $# = 1 ]
then
studydir=`basename ${graphml%\.*}`
else
studydir=$2
fi
if [ -e $studydir ]
then
echo "cannot make $studydir because one already exists with that name"
echo "either do ./destroy $studydir, or choose a unique name as 2nd arg"
else
echo "python3 mkconcore.py $graphml $sourcedir $studydir docker"
python3 mkconcore.py $graphml $sourcedir $studydir docker
fi