diff --git a/scripts/install.sh b/scripts/install.sh index 93e4981..b2dd3c5 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -4,13 +4,9 @@ HOME_DIR="/home/ubuntu" PROJECT_DIR="/vagrant" -if $CI -then - echo $CI +if [[ "$CI" == "true" ]]; then echo "HOME_DIR='$HOME'" >> .bashrc echo "PROJECT_DIR='$TRAVIS_BUILD_DIR'" >> .bashrc - echo $HOME_DIR - echo $PROJECT_DIR else echo 'HOME_DIR="/home/ubuntu"' >> .bashrc echo 'PROJECT_DIR="/vagrant"' >> .bashrc diff --git a/scripts/install_django_server.sh b/scripts/install_django_server.sh index d5483c7..dd2d4f7 100644 --- a/scripts/install_django_server.sh +++ b/scripts/install_django_server.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Back-end ressources installation -if $CI +if [[ "$CI" == "true" ]]; then then PYTHON=python3 PROJECT_DIR=$TRAVIS_BUILD_DIR @@ -14,7 +14,7 @@ DJANGO_DIR=$PROJECT_DIR/src/server/django_rest echo "DJANGO_DIR='$DJANGO_DIR'" >> .bashrc source .bashrc -if ! $CI +if [[ "$CI" != "true" ]]; then then sudo apt-get install -y python3.5 fi diff --git a/scripts/install_front_end.sh b/scripts/install_front_end.sh index de3621d..07d65d8 100644 --- a/scripts/install_front_end.sh +++ b/scripts/install_front_end.sh @@ -2,7 +2,7 @@ # Front-end ressources installation HOME_DIR="/home/ubuntu" -if $CI +if [[ "$CI" == "true" ]]; then then PROJECT_DIR=$TRAVIS_BUILD_DIR else @@ -20,7 +20,7 @@ sudo apt-get install -y nodejs # Fix error with shared folder and npm modules # https://medium.com/@dtinth/isolating-node-modules-in-vagrant-9e646067b36 -if ! $CI +if [[ "$CI" != "true" ]]; then then mkdir $HOME_DIR/vagrant_node_modules mkdir $PROJECT_DIR/node_modules diff --git a/scripts/install_opencv.sh b/scripts/install_opencv.sh index 4ba115a..c3a59df 100644 --- a/scripts/install_opencv.sh +++ b/scripts/install_opencv.sh @@ -38,7 +38,7 @@ sudo make install sudo ldconfig cd ~/ -if $CI +if [[ "$CI" == "true" ]]; then then echo "export PYTHONPATH=$PYTHONPATH:~/virtualenv/python3.5/site-packages" >> \ .bashrc