playwright/browser_patches/webkit/build.sh
2019-12-23 13:20:04 -08:00

26 lines
646 B
Bash
Executable file

#!/bin/bash
set -e
set +x
trap "cd $(pwd -P)" EXIT
cd "$(dirname $0)"
cd "checkout"
BUILD_TYPE=--release
if [[ -v WKDEBUG ]]; then
BUILD_TYPE=--debug
fi
if [[ "$(uname)" == "Darwin" ]]; then
./Tools/Scripts/build-webkit $BUILD_TYPE --touch-events
elif [[ "$(uname)" == "Linux" ]]; then
# Check that WebKitBuild exists and is not empty.
if ! [[ (-d ./WebKitBuild) && (-n $(ls -1 ./WebKitBuild/)) ]]; then
yes | DEBIAN_FRONTEND=noninteractive ./Tools/Scripts/update-webkitgtk-libs
fi
./Tools/Scripts/build-webkit --gtk $BUILD_TYPE --touch-events MiniBrowser
else
echo "ERROR: cannot upload on this platform!" 1>&2
exit 1;
fi