diff --git a/Makefile b/Makefile index 2497dde..be82267 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ optimize: lua $(LIB_LUA_FILES) .PHONY: clean clean: @echo "\033[1mDeleting...\033[0m" - @rm -rvf version lib/*.lua lib/*/*.lua compatibility/*.lua + @rm -rvf version lib/*.lua lib/*/*.lua .PHONY: install install: lua version optimize @@ -78,7 +78,7 @@ install: lua version optimize && chmod +x $$prefix/bin/nomsu$$version \ && cp -v nomsu $$prefix/bin \ && cp -v doc/nomsu.1 $$prefix/share/man/man1 \ - && cp -rv $(LUA_FILES) $(PEG_FILES) lib compatibility $$prefix/share/nomsu/$$version; + && cp -rv $(LUA_FILES) $(PEG_FILES) lib $$prefix/share/nomsu/$$version; .PHONY: uninstall uninstall: version diff --git a/compatibility/2.3.nom b/lib/compatibility/2.3.nom similarity index 100% rename from compatibility/2.3.nom rename to lib/compatibility/2.3.nom diff --git a/compatibility/2.4.nom b/lib/compatibility/2.4.nom similarity index 100% rename from compatibility/2.4.nom rename to lib/compatibility/2.4.nom diff --git a/compatibility/2.5.5.5.nom b/lib/compatibility/2.5.5.5.nom similarity index 100% rename from compatibility/2.5.5.5.nom rename to lib/compatibility/2.5.5.5.nom diff --git a/compatibility/2.5.nom b/lib/compatibility/2.5.nom similarity index 100% rename from compatibility/2.5.nom rename to lib/compatibility/2.5.nom diff --git a/compatibility/2.nom b/lib/compatibility/2.nom similarity index 100% rename from compatibility/2.nom rename to lib/compatibility/2.nom diff --git a/compatibility/3.5.5.6.nom b/lib/compatibility/3.5.5.6.nom similarity index 100% rename from compatibility/3.5.5.6.nom rename to lib/compatibility/3.5.5.6.nom diff --git a/compatibility/3.6.nom b/lib/compatibility/3.6.nom similarity index 100% rename from compatibility/3.6.nom rename to lib/compatibility/3.6.nom diff --git a/compatibility/3.7.nom b/lib/compatibility/3.7.nom similarity index 100% rename from compatibility/3.7.nom rename to lib/compatibility/3.7.nom diff --git a/compatibility/3.8.nom b/lib/compatibility/3.8.nom similarity index 100% rename from compatibility/3.8.nom rename to lib/compatibility/3.8.nom diff --git a/compatibility/3.nom b/lib/compatibility/3.nom similarity index 100% rename from compatibility/3.nom rename to lib/compatibility/3.nom diff --git a/compatibility/4.10.12.7.nom b/lib/compatibility/4.10.12.7.nom similarity index 100% rename from compatibility/4.10.12.7.nom rename to lib/compatibility/4.10.12.7.nom diff --git a/compatibility/4.11.nom b/lib/compatibility/4.11.nom similarity index 100% rename from compatibility/4.11.nom rename to lib/compatibility/4.11.nom diff --git a/compatibility/4.12.nom b/lib/compatibility/4.12.nom similarity index 100% rename from compatibility/4.12.nom rename to lib/compatibility/4.12.nom diff --git a/compatibility/4.8.10.nom b/lib/compatibility/4.8.10.nom similarity index 100% rename from compatibility/4.8.10.nom rename to lib/compatibility/4.8.10.nom diff --git a/compatibility/4.9.nom b/lib/compatibility/4.9.nom similarity index 100% rename from compatibility/4.9.nom rename to lib/compatibility/4.9.nom diff --git a/compatibility/5.13.nom b/lib/compatibility/5.13.nom similarity index 100% rename from compatibility/5.13.nom rename to lib/compatibility/5.13.nom diff --git a/compatibility/6.14.nom b/lib/compatibility/6.14.nom similarity index 100% rename from compatibility/6.14.nom rename to lib/compatibility/6.14.nom diff --git a/compatibility/compatibility.nom b/lib/compatibility/compatibility.nom similarity index 100% rename from compatibility/compatibility.nom rename to lib/compatibility/compatibility.nom diff --git a/compatibility/init.nom b/lib/compatibility/init.nom similarity index 100% rename from compatibility/init.nom rename to lib/compatibility/init.nom diff --git a/nomsu_environment.lua b/nomsu_environment.lua index 94e68e0..9952a65 100644 --- a/nomsu_environment.lua +++ b/nomsu_environment.lua @@ -35,7 +35,7 @@ local max_parser_version = 0 for version = 1, 999 do local peg_file if package.nomsupath then - local pegpath = package.nomsupath:gsub("%.nom", ".peg") + local pegpath = package.nomsupath:gsub("lib/%?%.nom", "?.peg"):gsub("lib/%?%.lua", "?.peg") do local path = package.searchpath("nomsu." .. tostring(version), pegpath, "/") if path then diff --git a/nomsu_environment.moon b/nomsu_environment.moon index 6049555..13cf776 100644 --- a/nomsu_environment.moon +++ b/nomsu_environment.moon @@ -20,7 +20,7 @@ max_parser_version = 0 for version=1,999 local peg_file if package.nomsupath - pegpath = package.nomsupath\gsub("%.nom", ".peg") + pegpath = package.nomsupath\gsub("lib/%?%.nom", "?.peg")\gsub("lib/%?%.lua", "?.peg") if path = package.searchpath("nomsu.#{version}", pegpath, "/") peg_file = io.open(path) else