[Mageia-sysadm] [805] add a git repository creation script

root at mageia.org root at mageia.org
Sun Jan 16 14:15:28 CET 2011


Revision: 805
Author:   misc
Date:     2011-01-16 14:15:28 +0100 (Sun, 16 Jan 2011)
Log Message:
-----------
add a git repository creation script

Modified Paths:
--------------
    puppet/modules/git/manifests/init.pp

Added Paths:
-----------
    puppet/modules/git/templates/create_git_repo.sh

Modified: puppet/modules/git/manifests/init.pp
===================================================================
--- puppet/modules/git/manifests/init.pp	2011-01-16 13:15:25 UTC (rev 804)
+++ puppet/modules/git/manifests/init.pp	2011-01-16 13:15:28 UTC (rev 805)
@@ -15,7 +15,16 @@
         file { "$git_base_path":
             ensure => directory
         }
+        
+        file { "/usr/local/bin/create_git_repo.sh":
+             ensure => present,
+             owner => root,
+             group => root,
+             mode => 755,
+             content => template('git/create_git_repo.sh')
+        }
 
+
         # TODO
         # define common syntax check, see svn 
         #          http://stackoverflow.com/questions/3719883/git-hook-syntax-check

Added: puppet/modules/git/templates/create_git_repo.sh
===================================================================
--- puppet/modules/git/templates/create_git_repo.sh	                        (rev 0)
+++ puppet/modules/git/templates/create_git_repo.sh	2011-01-16 13:15:28 UTC (rev 805)
@@ -0,0 +1,9 @@
+#!/bin/bash
+umask 0002
+# http://eagleas.livejournal.com/18907.html
+name="$1"
+mkdir -p $name
+cd $name 
+git --bare init --shared=group 
+chmod g+ws branches info objects refs 
+( cd objects; chmod g+ws * )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20110116/4680f040/attachment.html>


More information about the Mageia-sysadm mailing list