From 267f72f3e677d5d71c8f2b2f57423d8c942192d3 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 13 Feb 2008 17:13:59 +0000 Subject: Fix Git initializing to ignore different things per repository. --- localikiwikicreatesite | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'localikiwikicreatesite') diff --git a/localikiwikicreatesite b/localikiwikicreatesite index 3bd3019..8f3052c 100755 --- a/localikiwikicreatesite +++ b/localikiwikicreatesite @@ -3,7 +3,7 @@ # /usr/local/bin/localikiwikicreatesite # Copyright 2008 Jonas Smedegaard # -# $Id: localikiwikicreatesite,v 1.14 2008-02-13 17:03:49 jonas Exp $ +# $Id: localikiwikicreatesite,v 1.15 2008-02-13 17:13:59 jonas Exp $ # # Initialize ikiwiki site # @@ -67,10 +67,13 @@ git_init_pub() { git_init_work() { repo="$DESTSRCDIR/$1.git" targetdir="$2" + shift 2 (cd $targetdir git init - echo /.ikiwiki > .gitignore + for ignore in "$@"; do + echo "$1" >> .gitignore + done git add . git commit -m "initial commit" git remote add origin $repo @@ -131,8 +134,8 @@ mkdir -p $CFGDIR cp /usr/share/doc/ikiwiki/html/ikiwiki.setup $CFGDIR ## Init working RCS repositories -git_init_work "$project" "$CFGDIR" -git_init_work "${project}_content" "$SRCDIR" +git_init_work "$project" "$CFGDIR" "/content" +git_init_work "${project}_content" "$SRCDIR" "/.ikiwiki" ## Adjust backend to actual paths, and enable Git post-update wrapper perl -pi -e ' -- cgit v1.2.3