更新hvigorw脚本,适配ohos_app编译脚本

Signed-off-by: 翦英硕 <jianyingshuo@outlook.com>
This commit is contained in:
翦英硕 2023-12-07 11:36:54 +08:00
parent 49a4586788
commit 70a86a8547

View File

@ -10,7 +10,7 @@
# Add /usr/local/nodejs/bin to the PATH environment variable # Add /usr/local/nodejs/bin to the PATH environment variable
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
HVIGOR_APP_HOME=$(dirname $(readlink -f $0)) HVIGOR_APP_HOME="`pwd -P`"
HVIGOR_WRAPPER_SCRIPT=${HVIGOR_APP_HOME}/hvigor/hvigor-wrapper.js HVIGOR_WRAPPER_SCRIPT=${HVIGOR_APP_HOME}/hvigor/hvigor-wrapper.js
warn() { warn() {
echo "" echo ""
@ -29,7 +29,7 @@ fail() {
# Determine node to start hvigor wrapper script # Determine node to start hvigor wrapper script
if [ -n "${NODE_HOME}" ];then if [ -n "${NODE_HOME}" ];then
EXECUTABLE_NODE="${NODE_HOME}/node" EXECUTABLE_NODE="${NODE_HOME}/bin/node"
if [ ! -x "$EXECUTABLE_NODE" ];then if [ ! -x "$EXECUTABLE_NODE" ];then
fail "ERROR: NODE_HOME is set to an invalid directory,check $NODE_HOME\n\nPlease set NODE_HOME in your environment to the location where your nodejs installed" fail "ERROR: NODE_HOME is set to an invalid directory,check $NODE_HOME\n\nPlease set NODE_HOME in your environment to the location where your nodejs installed"
fi fi