From: Penny Leach Date: Sat, 19 Sep 2009 11:35:12 +0000 (+0200) Subject: newfgits changes X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=a74dade3016353b3b2cc4d1f0b5faacb5dc2d50f;p=scripts.git newfgits changes to support me telling it to place things in dotfiles or not and a bugfix --- 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"