From ac4aa75c7d4ae7d326571a37d97202454d0cca53 Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Wed, 18 Aug 2010 10:13:17 -0500 Subject: [PATCH] Adding bin/newgit --- bin/newgit | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 bin/newgit diff --git a/bin/newgit b/bin/newgit new file mode 100755 index 0000000..2383f47 --- /dev/null +++ b/bin/newgit @@ -0,0 +1,18 @@ +#!/bin/bash +# Usage: newgit path/to project-name.git" +# Create a new bare git respository + +if [ -z $1 ]; then + echo "usage: $FUNCNAME path/to project-name.git" +else + gitdir="$1/$2" + mkdir $gitdir + pushd $gitdir + git --bare init + git --bare update-server-info + mv hooks/post-update.sample hooks/post-update + chmod a+x hooks/post-update + touch git-daemon-export-ok + popd +fi + -- 2.45.2