summaryrefslogtreecommitdiff
path: root/test/create_testbed.sh
blob: c7e9a6db57b9e3d8669e10c509239c13acb7d010 (plain)
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
#!/bin/sh
##
## This script is part of the scorsh testbed. It must be executed by
## the scorsh_testsuite script
##

. ./scorsh_functions

### remove the directories if they exist already
[ -d ${REMOTE_REPO} ] && rm -rf ${REMOTE_REPO}
[ -d ${LOCAL_REPO} ] && rm -rf ${LOCAL_REPO}

### create the repository 
git init --bare ${REMOTE_REPO}
check "[ $? -eq 0 ]" $0 "create_remote_repo"

### clone it
git clone ${REMOTE_REPO} ${LOCAL_REPO}
check "[ $? -eq 0 ]" $0 "clone_remote_repo"





### create the directory where scorsh will be cloned
mkdir ${SCORSH_REPO}
check "[ $? -eq 0 ]" $0 "create_scorsh_repo_folder"

### clone the scorsh repo
olddir=$(pwd)
cd ${SCORSH_REPO}
git clone ${SCORSH_URL} ./
check "[ $? -eq 0 ]" $0 "clone_scorsh_repo"
cd ${olddir}

### make the scorshd executable
olddir=$(pwd)
cd ${SCORSH_REPO}
make
check "[ $? -eq 0 ]" $0 "make_scorshd"
cd ${olddir}


### create the directory where the scorsh app will run
mkdir ${SCORSH_APP}
check "[ $? -eq 0 ]" $0 "create_scorsh_app_folder"


return_results