11cb0ef41Sopenharmony_ci#!/bin/sh 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_ci# find the name of the log file to process, it must not start with a dash. 41cb0ef41Sopenharmony_cilog_file="v8.log" 51cb0ef41Sopenharmony_cifor arg in "$@" 61cb0ef41Sopenharmony_cido 71cb0ef41Sopenharmony_ci if ! expr "X${arg}" : "^X-" > /dev/null; then 81cb0ef41Sopenharmony_ci log_file=${arg} 91cb0ef41Sopenharmony_ci fi 101cb0ef41Sopenharmony_cidone 111cb0ef41Sopenharmony_ci 121cb0ef41Sopenharmony_citools_path=`cd $(dirname "$0");pwd` 131cb0ef41Sopenharmony_ciif [ ! "$D8_PATH" ]; then 141cb0ef41Sopenharmony_ci d8_public=`which d8` 151cb0ef41Sopenharmony_ci if [ -x "$d8_public" ]; then D8_PATH=$(dirname "$d8_public"); fi 161cb0ef41Sopenharmony_cifi 171cb0ef41Sopenharmony_ci[ -n "$D8_PATH" ] || D8_PATH=$tools_path/.. 181cb0ef41Sopenharmony_cid8_exec=$D8_PATH/d8 191cb0ef41Sopenharmony_ci 201cb0ef41Sopenharmony_ciif [ ! -x "$d8_exec" ]; then 211cb0ef41Sopenharmony_ci D8_PATH=`pwd`/out/native 221cb0ef41Sopenharmony_ci d8_exec=$D8_PATH/d8 231cb0ef41Sopenharmony_cifi 241cb0ef41Sopenharmony_ci 251cb0ef41Sopenharmony_ciif [ ! -x "$d8_exec" ]; then 261cb0ef41Sopenharmony_ci d8_exec=`grep -m 1 -o '".*/d8"' $log_file | sed 's/"//g'` 271cb0ef41Sopenharmony_cifi 281cb0ef41Sopenharmony_ci 291cb0ef41Sopenharmony_ciif [ ! -x "$d8_exec" ]; then 301cb0ef41Sopenharmony_ci echo "d8 shell not found in $D8_PATH" >&2 311cb0ef41Sopenharmony_ci echo "Please provide path to d8 as env var in D8_PATH" >&2 321cb0ef41Sopenharmony_ci exit 1 331cb0ef41Sopenharmony_cifi 341cb0ef41Sopenharmony_ci 351cb0ef41Sopenharmony_ci# nm spits out 'no symbols found' messages to stderr. 361cb0ef41Sopenharmony_cicat $log_file | $d8_exec --enable-os-system \ 371cb0ef41Sopenharmony_ci --module $tools_path/tickprocessor-driver.mjs -- $@ 38