From 43e5cc2f153e319ef7aa0ab6fcc2cd7aa00f6310 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 13 Mar 2019 23:03:47 +0800 Subject: [PATCH] ad list script --- scripts/list.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 scripts/list.lua diff --git a/scripts/list.lua b/scripts/list.lua new file mode 100644 index 000000000..dfdb1247a --- /dev/null +++ b/scripts/list.lua @@ -0,0 +1,10 @@ +function main(...) + local packages = {} + for _, dir in ipairs(os.dirs(path.join("packages", "*", "*"))) do + local package = path.filename(dir) + local key = package:sub(1, 1) + packages[key] = packages[key] or {} + table.insert(packages[key], package) + end + print(packages) +end