Initial commit

This commit is contained in:
kepler155c@gmail.com
2016-12-11 14:24:52 -05:00
commit fc243a9c12
110 changed files with 25577 additions and 0 deletions

16
sys/apis/fs/gitfs.lua Normal file
View File

@@ -0,0 +1,16 @@
local git = require('git')
local gitfs = { }
function gitfs.mount(dir, user, repo, branch)
if not user or not repo then
error('gitfs syntax: user, repo, [branch]')
end
local list = git.list(user, repo, branch)
for path, url in pairs(list) do
fs.mount(fs.combine(dir, path), 'urlfs', url)
end
end
return gitfs