playwright/browser_patches/webkit/clean.sh
Andrey Lushnikov 13e2ef1d10
devops: suppport WK_CHECKOUT_PATH variable (#4617)
`WK_CHECKOUT_PATH` defines location of webkit checkout on the
file system. All browser-related scripts, like `prepare_checkout.sh` and
`export.sh` respect this environment variable on all platforms.
2020-12-07 08:42:20 -08:00

24 lines
459 B
Bash
Executable File

#!/bin/bash
set -e
set +x
trap "cd $(pwd -P)" EXIT
cd "$(dirname $0)"
if [[ ! -z "${WK_CHECKOUT_PATH}" ]]; then
cd "${WK_CHECKOUT_PATH}"
echo "WARNING: checkout path from WK_CHECKOUT_PATH env: ${WK_CHECKOUT_PATH}"
else
cd "checkout"
fi
if [[ -d ./WebKitBuild ]]; then
rm -rf ./WebKitBuild/Release
fi
if [[ -d ./WebKitBuild/GTK ]]; then
rm -rf ./WebKitBuild/GTK/Release
fi
if [[ -d ./WebKitBuild/WPE ]]; then
rm -rf ./WebKitBuild/WPE/Release
fi