blob: 6b23df844ac6da74469ef80a9155d67803d1cb06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/usr/bin/env ruby
require_relative '../lib/gitlab_init'
#
# GitLab shell, invoked from ~/.ssh/authorized_keys
#
config = GitlabConfig.new
key_dir = File.dirname("#{config.auth_file}")
commands = [
"mkdir -p #{config.repos_path}",
"mkdir -p #{key_dir}",
"touch #{config.auth_file}",
"chmod -R ug+rwX,o-rwx #{config.repos_path}",
"find #{config.repos_path} -type d -print0 | xargs -0 chmod g+s"
]
commands.each do |cmd|
puts "#{cmd}: #{system(cmd)}"
end
exit
|