-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathcheckPreRequisites.sh
56 lines (47 loc) · 1.36 KB
/
checkPreRequisites.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
#!/usr/bin/env bash
echo '-------------------------------------------'
nodeVersion=$(node --version)
if [[ nodeVersion > 8.0 ]] || [[ nodeVersion == 8.0 ]]; then
echo 'Current node version: '
echo $nodeVersion
echo 'node: passed'
else
echo 'node version should be at least 4.0'
fi
echo '-------------------------------------------'
echo '\n'
###check couchdb
echo '-------------------------------------------'
couchdb=$(curl 'http://127.0.0.1:5986')
if [[ couchdb > 2.0 ]] || [[ couchdb == 2.0 ]]; then
echo 'Current couchdb version: '
echo $couchdb
echo 'couchdb: passed'
else
echo 'couchdb version should be at least 2.0'
fi
echo '-------------------------------------------'
echo '\n'
###check couchdb-lucene
echo '-------------------------------------------'
couchdbLucene=$(curl 'http://localhost:5985')
if [[ couchdbLucene > 2.0 ]] || [[ couchdbLucene == 2.0 ]]; then
echo 'Current couchdb-lucene version: '
echo $couchdbLucene
echo 'couchdb-lucene: passed'
else
echo 'couchdb-lucene version should be also at least 2.0'
fi
echo '-------------------------------------------'
echo '\n'
echo '-------------------------------------------'
gulpVersion=$(gulp --version)
if [[ gulpVersion ]]; then
echo 'Gulp is installed!'
echo $couchdbLucene
echo 'gulp: passed'
else
echo 'Install gulp'
fi
echo '-------------------------------------------'
echo '\n'