forked from pushkin-consortium-deprecated/deprecated3
-
Notifications
You must be signed in to change notification settings - Fork 4
/
start.debug.sh
73 lines (64 loc) · 1.9 KB
/
start.debug.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# if [ -d "db-worker/models/whichenglish" ]
# then
# echo "exists"
# else
# echo "n/a"
# fi
# cd server
# i=0
# while read line
# do
# array[ $i ]="$line"
# (( i++ ))
# done < <(ls -ls)
# echo ${array[1]}
# create an array with all the filer/dir inside ~/myDir
# if [ -d "./db-worker/models/$exp" ]
# then
# rsync -ua --progress ./experiments/$exp/models ./db-worker/models/$exp
# else
# mkdir db-worker/models/$exp
# rsync -ua --progress ./experiments/$exp/models ./db-worker/models/$exp
# fi
# if [ -d "./db-worker/seeds/$exp" ]
# then
# rsync -ua --progress ./experiments/$exp/seeds ./db-worker/seeds/$exp
# else
# mkdir db-worker/seeds/$exp
# rsync -ua --progress ./experiments/$exp/seeds ./db-worker/seeds/$exp
# fi
# if [ -d "./db-worker/models/$exp" ]
# then
# rsync -ua --progress ./experiments/$exp/models ./db-worker/models/$exp
# else
# mkdir db-worker/models/$exp
# rsync -ua --progress ./experiments/$exp/models ./db-worker/models/$exp
# fi
# if [ -d "./db-worker/models/$exp" ]
# then
# rsync -ua --progress ./experiments/$exp/models ./db-worker/models/$exp
# else
# mkdir db-worker/models/$exp
# rsync -ua --progress ./experiments/$exp/models ./db-worker/models/$exp
# fi
# if [ -d "./db-worker/models/$exp" ]
# then
# rsync -ua --progress ./experiments/$exp/models ./db-worker/models/$exp
# else
# mkdir db-worker/models/$exp
# rsync -ua --progress ./experiments/$exp/models ./db-worker/models/$exp
# fi
arr=(./experiments/*)
mkdir ./experiments/.temp
mkdir ./experiments/.temp/models
mkdir ./experiments/.temp/migrations
mkdir ./experiments/.temp/seeds
mkdir ./experiments/.temp/controllers
mkdir ./experiments/.temp/workers
for ((i=0; i<${#arr[@]}; i++))
do
exp = ${arr[$i]} | cut -d'/' -f 3
mkdir ./experiments/.temp/models/$exp
mkdir ./experiments/.temp/seeds/$exp
mkdir ./experiments/.temp/controllers
mkdir ./ex