summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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