Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pyAmak - documentation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SMAC
AMAK
Python
PyAMAK
pyAmak - documentation
Commits
97badee2
Commit
97badee2
authored
4 years ago
by
shined day
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
f2ec0738
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
script.sh
+80
-0
80 additions, 0 deletions
script.sh
with
80 additions
and
0 deletions
script.sh
0 → 100644
+
80
−
0
View file @
97badee2
#! /bin/sh
#console command
PYTHON
=
"python"
#console command for python
PIP
=
"pip3"
#console command for pip
#bool
NEWINSTALL
=
true
#clone everything / just update
LAUNCHMAIN
=
true
#start example at the end
LocalOnly
=
false
# don't look for last release online and compile with local work instead
#branch
COREBRANCH
=
"master"
IHMBRANCH
=
"master"
PHILBRANCH
=
"master"
function
compilelib
{
$PYTHON
setup.py bdist_wheel
$PIP
install
--force-reinstall
$1
}
function
updateremote
{
BranchToCompil
=
$1
IsLib
=
$2
PathToLib
=
$3
CURRENTBRANCH
=
$(
eval
"git rev-parse --abbrev-ref HEAD"
)
git stash
git checkout master
git pull
git checkout
$BranchToCompil
git pull
if
[
$IsLib
=
true
]
;
then
compilelib
"
$PathToLib
"
else
if
[
$LAUNCHMAIN
=
true
]
;
then
$PYTHON
./philosophersLaunchExample.py
else
read
-p
"Main is ready, press any key to unstash work and return to older version"
fi
fi
git checkout
$CURRENTBRANCH
git stash pop
}
if
[
$NEWINSTALL
=
true
]
;
then
$PIP
install
matplotlib
$PIP
install
wheel
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/philosopher_example.git
fi
if
[
$LocalOnly
=
false
]
;
then
cd
./pyamak-noyau/
updateremote
"
$COREBRANCH
"
"true"
"dist/pyAmakCore-0.0.1-py3-none-any.whl"
cd
../pyamak-ihm/
updateremote
"
$COREBRANCH
"
"true"
"dist/pyAmakCore-0.0.1-py3-none-any.whl"
cd
../philosopher_example/
updateremote
"
$COREBRANCH
"
"false"
"dist/pyAmakCore-0.0.1-py3-none-any.whl"
cd
../
else
cd
./pyamak-noyau/
compilelib
"dist/pyAmakCore-0.0.1-py3-none-any.whl"
cd
../pyamak-ihm/
compilelib
"dist/pyAmakCore-0.0.1-py3-none-any.whl"
cd
../philosopher_example/
if
[
$LAUNCHMAIN
=
true
]
;
then
$PYTHON
./philosophersLaunchExample.py
fi
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment