代码拉取完成,页面将自动刷新
TO_INSTALL = api bin conf dashboard orange install
ORANGE_HOME ?= /usr/local/orange
ORANGE_BIN ?= /usr/local/bin/orange
ORNAGE_HOME_PATH = $(subst /,\\/,$(ORANGE_HOME))
.PHONY: test install show
init-config:
@ test -f conf/nginx.conf || (cp conf/nginx.conf.example conf/nginx.conf && echo "copy nginx.conf")
@ test -f conf/orange.conf || (cp conf/orange.conf.example conf/orange.conf && echo "copy orange.conf")
test:
@echo "to be continued..."
install:init-config
@rm -rf $(ORANGE_BIN)
@rm -rf $(ORANGE_HOME)
@mkdir -p $(ORANGE_HOME)
@for item in $(TO_INSTALL) ; do \
cp -a $$item $(ORANGE_HOME)/; \
done;
@cat $(ORANGE_HOME)/conf/nginx.conf | sed "s/..\/?.lua;\/usr\/local\/lor\/?.lua;;/"$(ORNAGE_HOME_PATH)"\/?.lua;\/usr\/local\/lor\/?.lua;;/" > $(ORANGE_HOME)/conf/new_nginx.conf
@rm $(ORANGE_HOME)/conf/nginx.conf
@mv $(ORANGE_HOME)/conf/new_nginx.conf $(ORANGE_HOME)/conf/nginx.conf
@echo "#!/usr/bin/env resty" >> $(ORANGE_BIN)
@echo "package.path=\"$(ORANGE_HOME)/?.lua;;\" .. package.path" >> $(ORANGE_BIN)
@echo "require(\"bin.main\")(arg)" >> $(ORANGE_BIN)
@chmod +x $(ORANGE_BIN)
@echo "Orange installed."
$(ORANGE_BIN) help
show:
$(ORANGE_BIN) help
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。