1cb93a386Sopenharmony_ci#!/bin/bash 2cb93a386Sopenharmony_ci# Copyright 2020 Google LLC 3cb93a386Sopenharmony_ci# 4cb93a386Sopenharmony_ci# Use of this source code is governed by a BSD-style license that can be 5cb93a386Sopenharmony_ci# found in the LICENSE file. 6cb93a386Sopenharmony_ci 7cb93a386Sopenharmony_ci# This assumes it is being run inside a docker container of emsdk-base 8cb93a386Sopenharmony_ci# and a Skia checkout has been mounted at /SRC and the output directory 9cb93a386Sopenharmony_ci# is mounted at /OUT 10cb93a386Sopenharmony_ci 11cb93a386Sopenharmony_ciset +e 12cb93a386Sopenharmony_ciset -x 13cb93a386Sopenharmony_ci# Clean out previous builds (ignoring any errors for things like folders) 14cb93a386Sopenharmony_ci# (e.g. we don't want to delete /OUT/depot_tools/) 15cb93a386Sopenharmony_cirm -f /OUT/* 16cb93a386Sopenharmony_ciset -e 17cb93a386Sopenharmony_ci 18cb93a386Sopenharmony_ci# BASE_DIR is the dir this script is in ($SKIA_ROOT/infra/canvaskit) 19cb93a386Sopenharmony_ciBASE_DIR=`cd $(dirname ${BASH_SOURCE[0]}) && pwd` 20cb93a386Sopenharmony_ciCANVASKIT_DIR=$BASE_DIR/../../modules/canvaskit 21cb93a386Sopenharmony_ci 22cb93a386Sopenharmony_ciBUILD_DIR=/OUT $CANVASKIT_DIR/compile_gm.sh $@ 23cb93a386Sopenharmony_ci 24cb93a386Sopenharmony_ci# Make sure everybody can read and write the contents of /OUT 25cb93a386Sopenharmony_cichmod -R 0777 /OUT/* 26cb93a386Sopenharmony_ci 27