-- @@SHEBANG -- -*- Lua -*- -- gitano-auth -- -- Git (with) Augmented network operations -- User authentication wrapper -- -- Copyright 2012 Daniel Silverstone -- -- -- @@GITANO_LUA_PATH local gitano = require "gitano" local gall = require "gall" local luxio = require "luxio" local sio = require "luxio.simple" local sp = require "luxio.subprocess" -- @@GITANO_BIN_PATH -- @@GITANO_SHARE_PATH local repo_root = ... gitano.config.repo_path(repo_root) gitano.log.bump_level(gitano.log.level.CHAT) gitano.log.syslog.open() -- Now load the administration data local admin_repo = gall.repository.new((repo_root or "") .. "/gitano-admin.git") if not admin_repo then gitano.log.error("Usage: gitano-update-ssh /path/to/repos") gitano.log.fatal("Unable to locate administration repository. Cannot continue"); end local admin_head = admin_repo:get(admin_repo.HEAD) if not admin_head then gitano.log.fatal("Unable to find the HEAD of the administration repository. Cannot continue"); end local config, msg = gitano.config.parse(admin_head) if not config then gitano.log.critical("Unable to parse administration repository.") gitano.log.critical(" * " .. (msg or "No error?")) gitano.log.fatal("Cannot continue") end gitano.config.writessh(config) gitano.log.syslog.close() return 0