From 181ac1299ce8aaefa223a39f7d2ca789bfc719ea Mon Sep 17 00:00:00 2001 From: pmp-p Date: Thu, 19 Dec 2024 14:07:31 +0100 Subject: [PATCH] node path --- config | 1 + scripts/emsdk-fetch.sh | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/config b/config index 8f1c56b..426c635 100644 --- a/config +++ b/config @@ -148,6 +148,7 @@ do fi done +export SYS_NODE=$(echo -n $SDKROOT/emsdk/node/??.??.*/bin/node) # this is python used for emsdk : ${SYS_PYTHON} -> ${EMSDK_PYTHON} # sane default diff --git a/scripts/emsdk-fetch.sh b/scripts/emsdk-fetch.sh index 085dccc..c10be6b 100755 --- a/scripts/emsdk-fetch.sh +++ b/scripts/emsdk-fetch.sh @@ -222,14 +222,22 @@ END curl -fsSL https://bun.sh/install | bash + export SYS_NODE=$(echo -n $SDKROOT/emsdk/node/??.??.*/bin/node) + # emsdk shipped node cannot run on alpine if [ -f /alpine ] then - cp -vf /usr/bin/node $ROOT/emsdk/node/??.??.*/bin/node + if [ -f $SYS_NODE.glibc ] + then + echo "node alpine node version already selected" + else + mv $SYS_NODE $SYS_NODE.glibc + cp -vf /usr/bin/node $SYS_NODE + fi fi export PATH=$(echo -n ${SDKROOT}/emsdk/node/??.??.*/bin):$PATH - $ROOT/emsdk/node/??.??.*/bin/npm install --prefix $ROOT/emsdk/node/??.??.* -g pnpm@^9.0.0 + $SDKROOT/emsdk/node/??.??.*/bin/npm install --prefix $SDKROOT/emsdk/node/??.??.* -g pnpm@^9.0.0 # maybe rewrite that in python and move it to emcc.py @@ -560,6 +568,7 @@ END [ -f $FIXED ] || cp $TRUE $FIXED done + export SYS_NODE=$(echo -n $SDKROOT/emsdk/node/??.??.*/bin/node) export NPROC=1 export EMSDK_NUM_CORES=$NPROC