ferron

Ferron is a fast and simple static website generator made with Lua.
Log | Files | Refs | Submodules | README | LICENSE

commit 87ddb5eed0912d68901c68be4d60341fb39efd32
parent a91d48475805be3e470c18a570b112ca683ecb32
Author: Hugo Soucy <hugo.soucy@toumoro.com>
Date:   Mon, 10 Feb 2020 21:32:21 -0500

Replaces some arguments

Diffstat:
Mbin/cli | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/cli b/bin/cli @@ -10,7 +10,7 @@ local function getdirfiles(dir) local dirtree = {} for file in p:lines() do - if entry ~= '.' and entry ~= '..' then + if file ~= '.' and file ~= '..' then table.insert(dirtree, file) end end @@ -23,12 +23,12 @@ if arg[1] == 'install' and tonumber(_VERSION:match('%d+%.%d+')) >= config.depend -- First, check if luarocks is present in the env. if pcall(require, 'luarocks.loader') then -- Then install each dependency from the main configuration - for i, dependency in ipairs(config.dependencies.modules) do + for _, dependency in ipairs(config.dependencies.modules) do os.execute ('luarocks install --tree lua_modules ' .. dependency) end -- After looks for other dependencies in site's config file - for i, file in pairs(getdirfiles('sites')) do + for _, file in pairs(getdirfiles('sites')) do if file:find('config.lua') then local configfile, error = loadfile(file)