playwright/browser_patches/webkit/build.sh
Andrey Lushnikov ae574b302f
devops: fix webkit build on ubuntu (#3134)
Sometimes we actually pass one empty argument.
2020-07-23 16:59:45 -07:00

50 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
set -e
set +x
trap "cd $(pwd -P)" EXIT
cd "$(dirname $0)"
build_gtk() {
if ! [[ -d ./WebKitBuild/GTK/DependenciesGTK ]]; then
yes | WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/GTK DEBIAN_FRONTEND=noninteractive ./Tools/Scripts/update-webkitgtk-libs
fi
WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/GTK ./Tools/Scripts/build-webkit --gtk --release --touch-events --orientation-events --no-bubblewrap-sandbox MiniBrowser
}
build_wpe() {
if ! [[ -d ./WebKitBuild/WPE/DependenciesWPE ]]; then
yes | WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/WPE DEBIAN_FRONTEND=noninteractive ./Tools/Scripts/update-webkitwpe-libs
fi
WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal WEBKIT_OUTPUTDIR=$(pwd)/WebKitBuild/WPE ./Tools/Scripts/build-webkit --wpe --release --touch-events --orientation-events --no-bubblewrap-sandbox MiniBrowser
}
if [[ "$(uname)" == "Darwin" ]]; then
cd "checkout"
./Tools/Scripts/build-webkit --release --touch-events --orientation-events
elif [[ "$(uname)" == "Linux" ]]; then
cd "checkout"
if [[ $# == 0 || (-z "$1") ]]; then
echo
echo BUILDING: GTK and WPE
echo
build_wpe
build_gtk
elif [[ "$1" == "--gtk" ]]; then
echo
echo BUILDING: GTK
echo
build_gtk
elif [[ "$1" == "--wpe" ]]; then
echo
echo BUILDING: WPE
echo
build_wpe
fi
elif [[ "$(uname)" == MINGW* ]]; then
/c/Windows/System32/cmd.exe "/c buildwin.bat"
else
echo "ERROR: cannot upload on this platform!" 1>&2
exit 1;
fi