diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-04 09:50:28 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-04 09:50:28 +0200 |
commit | fcf70b91639cc4ee369631cf8fa4ebad4fbf04c8 (patch) | |
tree | 2a957cc8abf5edfccf069f70c2405c07e95c4554 /bin/install | |
parent | 1d180b7a75183ae463769b6bf09ee4eaf3bfc3d8 (diff) | |
download | gitlab-shell-fcf70b91639cc4ee369631cf8fa4ebad4fbf04c8.tar.gz |
install script
Diffstat (limited to 'bin/install')
-rwxr-xr-x | bin/install | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/install b/bin/install new file mode 100755 index 0000000..000a265 --- /dev/null +++ b/bin/install @@ -0,0 +1,19 @@ +#!/usr/bin/env ruby + +# +# GitLab shell, invoked from ~/.ssh/authorized_keys +# +ROOT_PATH = File.join(File.expand_path(File.dirname(__FILE__)), "..") + +commands = [ + "mkdir -p /home/git/repositories", + "mkdir -p /home/git/.ssh", + "chmod -R ug+rwX,o-rwx /home/git/repositories/", + "find /home/git/repositories -type d -print0 | xargs -0 chmod g+s" +] + +commands.each do |cmd| + puts "#{cmd}: #{system(cmd)}" +end + +exit |