代码拉取完成,页面将自动刷新
define ColorInfo
tput setaf 6;echo $1;tput sgr0
endef
define ColorError
tput setaf 1;echo $1;tput sgr0
endef
ifneq ($(CONFIG_OUI_USE_HOST_NODE),)
NODE_PATH := PATH=$(PATH)
else
NODE_PATH := PATH=$(STAGING_DIR_HOSTPKG)/bin
endif
NODE := $(NODE_PATH) node
NPM := $(NODE_PATH) npm
NODE_BIN := $(shell $(NODE_PATH) $(STAGING_DIR_HOST)/bin/which node)
ifneq ($(NODE_BIN),)
NODE_VER := $(shell $(NODE_BIN) -v | sed 's/v//')
endif
define CheckNode
$(call ColorInfo, "Checking Node.js for building oui..."); \
if [ -n "$(CONFIG_OUI_USE_HOST_NODE)" ]; \
then \
$(call ColorInfo, "Using Node.js from Host"); \
else \
$(call ColorInfo, "Using Node.js from OpenWrt"); \
fi; \
if [ -z "$(NODE_VER)" ]; \
then \
$(call ColorError, "Node.js $(1)+ is required");false; \
else \
$(call ColorInfo, "Node.js path: $(NODE_BIN)"); \
$(call ColorInfo, "Node.js version: $(NODE_VER)"); \
if [ "$(shell echo $(NODE_VER) | awk '{if ($$1 >= $(1)) { printf "ok" }}')" != "ok" ]; \
then \
$(call ColorError, "Node.js $(1)+ is required");false; \
fi \
fi
endef
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。