diff options
author | Michael Scherer <misc@mageia.org> | 2011-01-16 13:15:28 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2011-01-16 13:15:28 +0000 |
commit | ba49d46bd1174eb9d53482d60ff23abf3fe0ba1b (patch) | |
tree | a5ecdc22b8a4a458c7ad36e0a1824bbf030e2dac | |
parent | f24aac3f9c039873e410c69f12e273c0a3fc9d15 (diff) | |
download | puppet-ba49d46bd1174eb9d53482d60ff23abf3fe0ba1b.tar puppet-ba49d46bd1174eb9d53482d60ff23abf3fe0ba1b.tar.gz puppet-ba49d46bd1174eb9d53482d60ff23abf3fe0ba1b.tar.bz2 puppet-ba49d46bd1174eb9d53482d60ff23abf3fe0ba1b.tar.xz puppet-ba49d46bd1174eb9d53482d60ff23abf3fe0ba1b.zip |
add a git repository creation script
-rw-r--r-- | modules/git/manifests/init.pp | 9 | ||||
-rw-r--r-- | modules/git/templates/create_git_repo.sh | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/modules/git/manifests/init.pp b/modules/git/manifests/init.pp index 2f0f9844..34428e5c 100644 --- a/modules/git/manifests/init.pp +++ b/modules/git/manifests/init.pp @@ -15,6 +15,15 @@ class git { 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 diff --git a/modules/git/templates/create_git_repo.sh b/modules/git/templates/create_git_repo.sh new file mode 100644 index 00000000..69cfa6ff --- /dev/null +++ b/modules/git/templates/create_git_repo.sh @@ -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 * ) |