Skip to content
Snippets Groups Projects
Commit bb95410a authored by shined day's avatar shined day
Browse files

Update script.sh

parent 97badee2
Branches
No related tags found
No related merge requests found
#! /bin/sh #! /bin/sh
#console command #console command
PYTHON="python" #console command for python PYTHON="python" #console command for python
PIP="pip3" #console command for pip PIP="pip3" #console command for pip
#bool #bool
NEWINSTALL=true #clone everything / just update NEWINSTALL=true # true : New project installation / false : project update
LAUNCHMAIN=true #start example at the end LAUNCHMAIN=true # true : launch main before exit
LocalOnly=false # don't look for last release online and compile with local work instead LocalOnly=false # true : don't watch online updates, just compile the local version
#branch #branch
COREBRANCH="master" COREBRANCH="master"
...@@ -20,7 +19,6 @@ function compilelib { ...@@ -20,7 +19,6 @@ function compilelib {
} }
function updateremote { function updateremote {
BranchToCompil=$1 BranchToCompil=$1
IsLib=$2 IsLib=$2
PathToLib=$3 PathToLib=$3
...@@ -31,7 +29,7 @@ function updateremote { ...@@ -31,7 +29,7 @@ function updateremote {
git pull git pull
git checkout $BranchToCompil git checkout $BranchToCompil
git pull git pull
if [ $IsLib = true ]; then if [ $IsLib = true ]; then
compilelib "$PathToLib" compilelib "$PathToLib"
else else
...@@ -39,18 +37,15 @@ function updateremote { ...@@ -39,18 +37,15 @@ function updateremote {
$PYTHON ./philosophersLaunchExample.py $PYTHON ./philosophersLaunchExample.py
else else
read -p "Main is ready, press any key to unstash work and return to older version" read -p "Main is ready, press any key to unstash work and return to older version"
fi fi
fi fi
git checkout $CURRENTBRANCH git checkout $CURRENTBRANCH
git stash pop git stash pop
} }
if [ $NEWINSTALL = true ]; then if [ $NEWINSTALL = true ]; then
$PIP install matplotlib $PIP install matplotlib
$PIP install wheel $PIP install wheel
git clone https://gitlab.com/be-pyamak/pyamak-ihm.git git clone https://gitlab.com/be-pyamak/pyamak-ihm.git
git clone https://gitlab.com/be-pyamak/pyamak-noyau.git git clone https://gitlab.com/be-pyamak/pyamak-noyau.git
git clone https://gitlab.com/be-pyamak/philosopher_example.git git clone https://gitlab.com/be-pyamak/philosopher_example.git
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment