summaryrefslogtreecommitdiff
path: root/bin/install
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-04 09:50:28 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-04 09:50:28 +0200
commitfcf70b91639cc4ee369631cf8fa4ebad4fbf04c8 (patch)
tree2a957cc8abf5edfccf069f70c2405c07e95c4554 /bin/install
parent1d180b7a75183ae463769b6bf09ee4eaf3bfc3d8 (diff)
downloadgitlab-shell-fcf70b91639cc4ee369631cf8fa4ebad4fbf04c8.tar.gz
install script
Diffstat (limited to 'bin/install')
-rwxr-xr-xbin/install19
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