Skip to content

Commit

Permalink
Fix bug with script not executing correctly outside of travis
Browse files Browse the repository at this point in the history
  • Loading branch information
vbouquet committed Nov 29, 2017
1 parent f9d7e9b commit fa90385
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
6 changes: 1 addition & 5 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scripts/install_django_server.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scripts/install_front_end.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/install_opencv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fa90385

Please sign in to comment.