diff options
-rwxr-xr-x | make-feed.lua | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/make-feed.lua b/make-feed.lua index 4faf0b0..38c23f5 100755 --- a/make-feed.lua +++ b/make-feed.lua @@ -3,12 +3,14 @@ local json = require "json" local sha1 = require "sha1" local lfs = require "lfs" local inspect = require "inspect" ---local argparse = require "argparse" - ---local parser = argparse() ---local args = parser:parse() - -local args = {macros = "/home/g/subs/automation-scripts/macros", modules = "/home/g/subs/automation-scripts/modules", config = "/home/g/subs/depctrl-feedmaker/conf.lua", output = "DependencyControl.json"} +local argparse = require "argparse" + +local parser = argparse() {description = "experimental DependencyControl feed generator"} +parser:option("--macros", "Macro Directory") +parser:option("--modules", "Module Directory") +parser:option("-o --output", "Output File", "DependencyControl.json") +parser:option("-c --config", "Feed Configuration file") +local args = parser:parse() local config = loadfile(args.config)() |