chore: use existing is_linux function (#16509)

This commit is contained in:
Yury Semikhatsky 2022-08-12 12:38:19 -07:00 committed by GitHub
parent e1d3246d1c
commit d9e8e1e92d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,19 +7,6 @@ cd "$(dirname "$0")"
SCRIPT_FOLDER="$(pwd -P)"
source "${SCRIPT_FOLDER}/../utils.sh"
is_ubuntu_18_04() {
local id version_id
if [[ -f "/etc/os-release" ]]; then
id=$(cat /etc/os-release | sed -n -r "s|^ID=(.*)$|\1|p")
version_id=$(cat /etc/os-release | sed -n -r "s|^VERSION_ID=\"(.*)\"$|\1|p")
[[ "$id" == "ubuntu" && "$version_id" == "18.04" ]]
else
return 1
fi
}
build_gtk() {
if [[ ! -d "./WebKitBuild/GTK/DependenciesGTK" ]]; then
yes | WEBKIT_JHBUILD=1 \
@ -32,7 +19,7 @@ build_gtk() {
--cmakeargs=-DENABLE_INTROSPECTION=OFF
--cmakeargs=-DUSE_GSTREAMER_WEBRTC=FALSE
)
if is_ubuntu_18_04; then
if is_linux ubuntu 18.04; then
CMAKE_ARGS+=("--cmakeargs=-DUSE_SYSTEM_MALLOC=ON")
fi
if [[ -n "${EXPORT_COMPILE_COMMANDS}" ]]; then
@ -58,7 +45,7 @@ build_wpe() {
--cmakeargs=-DENABLE_WEBXR=OFF
--cmakeargs=-DUSE_GSTREAMER_WEBRTC=FALSE
)
if is_ubuntu_18_04; then
if is_linux ubuntu 18.04; then
CMAKE_ARGS+=("--cmakeargs=-DUSE_SYSTEM_MALLOC=ON")
fi
if [[ -n "${EXPORT_COMPILE_COMMANDS}" ]]; then