Files
weiguang-jewelry-ledger/演示/周转金/启动演示.command
T

15 lines
413 B
Bash
Raw Normal View History

#!/bin/zsh
cd -- "${0:A:h}" || exit 1
if [[ -x /opt/homebrew/bin/node ]]; then
demo_node=/opt/homebrew/bin/node
elif command -v node >/dev/null 2>&1; then
demo_node=$(command -v node)
else
print "未找到Node.js。请先安装Node.js,再双击打开演示。"
read -r "?按回车关闭。"
exit 1
fi
"$demo_node" server.js
if [[ $? -ne 0 ]]; then
read -r "?启动未完成,按回车关闭。"
fi