-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathinstall.sh
64 lines (51 loc) · 1.38 KB
/
install.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
set -ex
if [[ -z "${PBRANCH}" ]]; then
echo " - DEFAULT BRANCH WILL BE SET."
export PBRANCH="development"
fi
export PUBLISH_HOME="$HOME"
#don't think its used
export DIR_BASE="$PUBLISH_HOME/publisher"
#important to first remove
rm -f $PUBLISH_HOME/env.sh
if [[ -f "env.sh" ]]; then
#means we are working from an environment where env is already there e.g. when debug in publishing tools itself
ln -sfv $PWD/env.sh $PUBLISH_HOME/env.sh
if [[ -d "/workspace" ]]
then
ln -sfv $PWD/env.sh /workspace/env.sh
fi
else
curl https://raw.githubusercontent.com/freeflowuniverse/crystaltools/$PBRANCH/env.sh > $PUBLISH_HOME/env.sh
if [[ -d "/workspace" ]]
then
cp $PUBLISH_HOME/env.sh /workspace/env.sh
fi
fi
bash -e $PUBLISH_HOME/env.sh
source $PUBLISH_HOME/env.sh
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
sudo apt install libssl-dev -y
sudo apt install redis -y
sudo apt install gcc make -y
sudo /etc/init.d/redis-server start
elif [[ "$OSTYPE" == "darwin"* ]]; then
if ! [ -x "$(command -v redis-server)" ]; then
brew install redis
fi
brew services start redis
fi
pushd $DIR_CT
git pull
popd "$@" > /dev/null
if [[ -f "$HOME/.vmodules/done_crystallib" ]]; then
pushd ~/.vmodules/despiegk/crystallib
#git pull
popd "$@" > /dev/null
fi
# ct_reset
ct_build
build
clear
ct_help
echo "**** INSTALL WAS OK ****"