From 5d4a919a4b7f90389bbf43a06182aa5b8784cb2d Mon Sep 17 00:00:00 2001 From: LeoTM <1881059+leotm@users.noreply.github.com> Date: Wed, 31 Jul 2024 16:02:25 +0100 Subject: [PATCH] test(ses): create shellscript to run hermesc on any OS --- packages/ses/scripts/hermesc.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 packages/ses/scripts/hermesc.sh diff --git a/packages/ses/scripts/hermesc.sh b/packages/ses/scripts/hermesc.sh new file mode 100755 index 0000000000..abf8249edb --- /dev/null +++ b/packages/ses/scripts/hermesc.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +OS="$(uname -s)" + +case "$OS" in + Linux*) + OS_DIR="linux64-bin" + ;; + Darwin*) + OS_DIR="osx-bin" + ;; + CYGWIN*|MINGW*|MSYS*) + OS_DIR="win64-bin" + ;; + *) + echo "Unsupported OS: $OS" + exit 1 + ;; +esac + +HERMESC="../../node_modules/hermes-engine-cli/$OS_DIR/hermesc" + +$HERMESC -emit-binary -out test/hermes-smoke.hbc test/hermes-smoke.js