diff --git a/Makefile b/Makefile index 3a83ce90fb5f..0fb7a67dfbdd 100644 --- a/Makefile +++ b/Makefile @@ -113,34 +113,47 @@ install: $(INSTALL) conf/config.yaml /usr/local/apisix/conf/config.yaml $(INSTALL) conf/cert/apisix.* /usr/local/apisix/conf/cert/ - $(INSTALL) -d $(INST_LUADIR)/apisix/lua/apisix/core + $(INSTALL) -d $(INST_LUADIR)/apisix/lua $(INSTALL) lua/*.lua $(INST_LUADIR)/apisix/lua/ - $(INSTALL) lua/apisix/core/*.lua $(INST_LUADIR)/apisix/lua/apisix/core/ + + $(INSTALL) -d $(INST_LUADIR)/apisix/lua/apisix $(INSTALL) lua/apisix/*.lua $(INST_LUADIR)/apisix/lua/apisix/ + $(INSTALL) -d $(INST_LUADIR)/apisix/lua/apisix/admin + $(INSTALL) lua/apisix/admin/*.lua $(INST_LUADIR)/apisix/lua/apisix/admin/ + + $(INSTALL) -d $(INST_LUADIR)/apisix/lua/apisix/core + $(INSTALL) lua/apisix/core/*.lua $(INST_LUADIR)/apisix/lua/apisix/core/ + $(INSTALL) -d $(INST_LUADIR)/apisix/lua/apisix/http $(INSTALL) lua/apisix/http/*.lua $(INST_LUADIR)/apisix/lua/apisix/http/ $(INSTALL) -d $(INST_LUADIR)/apisix/lua/apisix/http/router - $(INSTALL) lua/apisix/http/router/*.lua $(INST_LUADIR)/apisix/lua/apisix/http/router + $(INSTALL) lua/apisix/http/router/*.lua $(INST_LUADIR)/apisix/lua/apisix/http/router/ - $(INSTALL) -d $(INST_LUADIR)/apisix/lua/apisix/plugins/prometheus/ - $(INSTALL) lua/apisix/plugins/prometheus/*.lua $(INST_LUADIR)/apisix/lua/apisix/plugins/prometheus/ - - $(INSTALL) -d $(INST_LUADIR)/apisix/lua/apisix/plugins/zipkin/ - $(INSTALL) lua/apisix/plugins/zipkin/*.lua $(INST_LUADIR)/apisix/lua/apisix/plugins/zipkin/ + $(INSTALL) -d $(INST_LUADIR)/apisix/lua/apisix/plugins + $(INSTALL) lua/apisix/plugins/*.lua $(INST_LUADIR)/apisix/lua/apisix/plugins/ - $(INSTALL) -d $(INST_LUADIR)/apisix/lua/apisix/plugins/grpc-transcode/ + $(INSTALL) -d $(INST_LUADIR)/apisix/lua/apisix/plugins/grpc-transcode $(INSTALL) lua/apisix/plugins/grpc-transcode/*.lua $(INST_LUADIR)/apisix/lua/apisix/plugins/grpc-transcode/ - $(INSTALL) -d $(INST_LUADIR)/apisix/lua/apisix/plugins/limit-count/ + $(INSTALL) -d $(INST_LUADIR)/apisix/lua/apisix/plugins/limit-count $(INSTALL) lua/apisix/plugins/limit-count/*.lua $(INST_LUADIR)/apisix/lua/apisix/plugins/limit-count/ - $(INSTALL) -d $(INST_LUADIR)/apisix/lua/apisix/plugins - $(INSTALL) lua/apisix/plugins/*.lua $(INST_LUADIR)/apisix/lua/apisix/plugins/ + $(INSTALL) -d $(INST_LUADIR)/apisix/lua/apisix/plugins/prometheus + $(INSTALL) lua/apisix/plugins/prometheus/*.lua $(INST_LUADIR)/apisix/lua/apisix/plugins/prometheus/ - $(INSTALL) -d $(INST_LUADIR)/apisix/lua/apisix/admin - $(INSTALL) lua/apisix/admin/*.lua $(INST_LUADIR)/apisix/lua/apisix/admin/ + $(INSTALL) -d $(INST_LUADIR)/apisix/lua/apisix/plugins/zipkin + $(INSTALL) lua/apisix/plugins/zipkin/*.lua $(INST_LUADIR)/apisix/lua/apisix/plugins/zipkin/ + + $(INSTALL) -d $(INST_LUADIR)/apisix/lua/apisix/stream + $(INSTALL) lua/apisix/stream/*.lua $(INST_LUADIR)/apisix/lua/apisix/stream/ + + $(INSTALL) -d $(INST_LUADIR)/apisix/lua/apisix/stream/plugins + $(INSTALL) lua/apisix/stream/plugins/*.lua $(INST_LUADIR)/apisix/lua/apisix/stream/plugins/ + + $(INSTALL) -d $(INST_LUADIR)/apisix/lua/apisix/stream/router + $(INSTALL) lua/apisix/stream/router/*.lua $(INST_LUADIR)/apisix/lua/apisix/stream/router/ $(INSTALL) COPYRIGHT $(INST_CONFDIR)/COPYRIGHT $(INSTALL) README.md $(INST_CONFDIR)/README.md diff --git a/utils/gen-install-folder.sh b/utils/gen-install-folder.sh new file mode 100755 index 000000000000..6d73bb6e5bfc --- /dev/null +++ b/utils/gen-install-folder.sh @@ -0,0 +1 @@ +find lua -type d | sort | awk '{print "$(INSTALL) -d $(INST_LUADIR)/apisix/" $0 "\n" "$(INSTALL) " $0 "/*.lua $(INST_LUADIR)/apisix/" $0 "/\n" }'