1 Star 6 Fork 2

githubsync/orange

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 1.16 KB
一键复制 编辑 原始数据 按行查看 历史
soul11201 提交于 2017-06-19 16:44 +08:00 . fix: sed bre pattern
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Lua
1
https://gitee.com/githubsync/orange.git
git@gitee.com:githubsync/orange.git
githubsync
orange
orange
master

搜索帮助