mirror of
https://github.com/Jrohy/python3-install.git
synced 2026-04-02 18:58:14 +00:00
Change judge py3 way
This commit is contained in:
@@ -132,13 +132,15 @@ compileInstall(){
|
||||
webInstall(){
|
||||
if [[ ${OS} == 'CentOS' || ${OS} == 'Fedora' ]];then
|
||||
[[ ${OS} == 'CentOS' ]] && ${PACKAGE_MANAGER} install epel-release -y
|
||||
if [[ -z $(rpm -qa|grep python3) ]];then
|
||||
if ! type python3 >/dev/null 2>&1;then
|
||||
${PACKAGE_MANAGER} install https://centos7.iuscommunity.org/ius-release.rpm -y
|
||||
${PACKAGE_MANAGER} install python36u -y
|
||||
ln -s /bin/python3.6 /bin/python3
|
||||
fi
|
||||
else
|
||||
[[ -z $(dpkg -l|grep python3) ]] && ${PACKAGE_MANAGER} install python3 -y
|
||||
if ! type python3 >/dev/null 2>&1;then
|
||||
${PACKAGE_MANAGER} install python3 -y
|
||||
fi
|
||||
${PACKAGE_MANAGER} install python3-distutils -y >/dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user