Skip to content

Commit 62573cf

Browse files
committed
where's the error?
1 parent 498a79f commit 62573cf

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/install_dependencies.sh

+12-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,21 @@ sudo apt-get update
44
sudo apt-get install -y lsb-core
55
sudo apt-get install -y --no-install-recommends build-essential castxml cmake libgtest-dev liblapacke-dev libopenblas-dev libpugixml-dev sqlite3
66

7+
IS_PYTHON_3_10=0
8+
echo "!!!!!!! Python version: ${PYTHON_BINDING_VERSION} !!!!!!!"
9+
if [ "${PYTHON_BINDING_VERSION}" == "3.10" ]; then
10+
echo "!!!!!!! Python version is 3.10 detected !!!!!!!"
11+
IS_PYTHON_3_10=1
12+
fi
13+
14+
IS_UBUNTU_20_04=0
715
if [ `lsb_release -a | grep Release | grep "20.04" | wc -l` == 1 ]; then
8-
echo "!!!!!!! Ubunut 20.04: remove python2 !!!!!!!"
16+
echo "!!!!!!! Ubuntu 20.04: remove python2 !!!!!!!"
917
sudo apt autoremove python2 python2-dev -y
18+
IS_UBUNTU_20_04=1
1019
fi
1120

12-
if [ `lsb_release -a | grep Release | grep "20.04" | wc -l` == 1 ] -a [ "${PYTHON_BINDING_VERSION}" == "3.10" ]; then
21+
if (( IS_UBUNTU_20_04 && IS_PYTHON_3_10 )); then
1322
echo "!!!!!!! Ubunut 20.04 and python 3.10: install python 3.10 and remove boost !!!!!!!"
1423
sudo add-apt-repository ppa:deadsnakes/ppa -y
1524
sudo apt-get update
@@ -30,7 +39,7 @@ sudo pip${PYTHON_BINDING_VERSION} install testresources
3039
sudo pip${PYTHON_BINDING_VERSION} install --upgrade setuptools==59.6.0
3140
sudo pip${PYTHON_BINDING_VERSION} install colcon-common-extensions xmlrunner pygccxml pyplusplus
3241

33-
if [ `lsb_release -a | grep Release | grep "20.04" | wc -l` == 1 ] -a [ "${PYTHON_BINDING_VERSION}" == "3.10" ]; then
42+
if (( IS_UBUNTU_20_04 && IS_PYTHON_3_10 )); then
3443
echo "!!!!!!! Ubunut 20.04 and python 3.10: compile boost !!!!!!!"
3544
pushd dependencies
3645

0 commit comments

Comments
 (0)