#!/usr/bin/env ruby #-- # Copyright (C) 2009 Brown Beagle Software # Copyright (C) 2008 Darcy Laycock # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . #++ REAL_FILE = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__ # Require the proper gitauth file. require File.expand_path(File.join(File.dirname(REAL_FILE), "..", "lib", "gitauth")) GitAuth.setup! # Gitorious does it so I should too! File.umask(0022) user_name = ARGV[0] command = ENV["SSH_ORIGINAL_COMMAND"] GitAuth::Client.start!(user_name, command)