mirror of
git://code.qt.io/qt/qt5.git
synced 2026-04-21 20:36:54 +08:00
Fix provisioning script for RHEL 6
It seems RHEL 6.6 does not provide /etc/os-release. Change-Id: I01ba2bb17b89c01f9991944a11eeaa9c2eba6f20 Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
This commit is contained in:
@@ -74,6 +74,25 @@ is_script_executed common.sourced.sh \
|
|||||||
&& fatal "Script common.sourced.sh should always be sourced, not executed"
|
&& fatal "Script common.sourced.sh should always be sourced, not executed"
|
||||||
|
|
||||||
|
|
||||||
|
_detect_linux_OS_ID () {
|
||||||
|
if [ -f /etc/os-release ]
|
||||||
|
then
|
||||||
|
. /etc/os-release
|
||||||
|
PROVISIONING_OS_ID="$ID"
|
||||||
|
elif [ -f /etc/redhat-release ]
|
||||||
|
then
|
||||||
|
case "$(cat /etc/redhat-release)" in
|
||||||
|
"Red Hat Enterprise Linux"*)
|
||||||
|
PROVISIONING_OS_ID="rhel"
|
||||||
|
;;
|
||||||
|
"CentOS Linux"*)
|
||||||
|
PROVISIONING_OS_ID="centos"
|
||||||
|
;;
|
||||||
|
*) fatal "Unknown string in /etc/redhat-release" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
set_common_environment () {
|
set_common_environment () {
|
||||||
# Unfortunately we can't find the provisioning directory from a sourced
|
# Unfortunately we can't find the provisioning directory from a sourced
|
||||||
# script in a portable way
|
# script in a portable way
|
||||||
@@ -86,8 +105,7 @@ set_common_environment () {
|
|||||||
case "$uname_s" in
|
case "$uname_s" in
|
||||||
Linux)
|
Linux)
|
||||||
PROVISIONING_OS=linux
|
PROVISIONING_OS=linux
|
||||||
. /etc/os-release
|
_detect_linux_OS_ID
|
||||||
PROVISIONING_OS_ID="$ID"
|
|
||||||
case "$PROVISIONING_OS_ID" in
|
case "$PROVISIONING_OS_ID" in
|
||||||
suse|sles|opensuse*)
|
suse|sles|opensuse*)
|
||||||
CMD_PKG_INSTALL="sudo zypper -nq install"
|
CMD_PKG_INSTALL="sudo zypper -nq install"
|
||||||
|
|||||||
Reference in New Issue
Block a user