From a74dade3016353b3b2cc4d1f0b5faacb5dc2d50f Mon Sep 17 00:00:00 2001 From: Penny Leach Date: Sat, 19 Sep 2009 13:35:12 +0200 Subject: [PATCH] newfgits changes to support me telling it to place things in dotfiles or not and a bugfix --- bin/newfgits | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/newfgits b/bin/newfgits index 620461d..f895f8c 100755 --- a/bin/newfgits +++ b/bin/newfgits @@ -1,16 +1,18 @@ #!/bin/sh # run like: -# newfgits reponame +# newfgits reponame dotfiles # or -# newfgits reponame private +# newfgits reponame dotfiles private +set -x GITSERVER=git.mjollnir.org PUBLICGITPATH=/var/git PRIVATEGITPATH=/var/gitprivate REPO=$1 -PRIVATE=$2 +SUBPATH=$2 +PRIVATE=$3 GITPATH=$PUBLICGITPATH @@ -18,9 +20,11 @@ if [ "$PRIVATE" = "private" ]; then GITPATH=$PRIVATEGITPATH fi +GITPATH=$GITPATH/$SUBPATH + GIT_DIR=~/.fgits/$REPO.git git init --bare && cd .fgits/$REPO.git \ - && git config core.bare false && git config core.worktree ../../ \ && git remote add origin ssh://$GITSERVER$GITPATH/$REPO.git \ + && git config core.bare false && git config core.worktree ../../ \ && git config branch.master.remote origin && git config branch.master.merge refs/heads/master ssh $GITSERVER "GIT_DIR=$GITPATH/$REPO.git git init-db" -- 2.39.5