[ci] Do not symlink python36 to python3 if it already exists

CentOS now provides it's own symlink of python3 -> python34, so we either remove
it first or symlink if that file doesn't exist yet.
This fixes #666.

(cherry picked from commit 045c8b32927720ece265e01d8a80ce782692a315)
This commit is contained in:
Dan Čermák 2019-01-26 20:14:48 +01:00
parent a11e198e64
commit 4151ad4c15
No known key found for this signature in database
GPG Key ID: E632C3380610D1C5

View File

@ -53,7 +53,12 @@ case "$distro_id" in
yum clean all
yum -y install gcc-c++ clang cmake3 make ccache expat-devel zlib-devel libssh-devel libcurl-devel gtest-devel which python36 dos2unix
# symlink up to date versions of python & cmake to 'default' names
ln -s /usr/bin/python36 /usr/bin/python3
if [ ! -e /usr/bin/python3 ]; then
ln -s /usr/bin/python36 /usr/bin/python3
elif [ -L /usr/bin/python3 ]; then
rm /usr/bin/python3
ln -s /usr/bin/python36 /usr/bin/python3
fi
mv /bin/cmake /bin/.cmake.old
ln -s /bin/cmake3 /bin/cmake
;;