From f9af577b7206318e33530af7c07932baf9365ca2 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 13 Feb 2008 15:26:54 +0000 Subject: Use more backwards-compatible Git init (taken from ikiwiki-makerepo). Drop newlines at parantheses. --- localikiwikicreatesite | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'localikiwikicreatesite') diff --git a/localikiwikicreatesite b/localikiwikicreatesite index b95949f..be6630a 100755 --- a/localikiwikicreatesite +++ b/localikiwikicreatesite @@ -3,7 +3,7 @@ # /usr/local/bin/localikiwikicreatesite # Copyright 2008 Jonas Smedegaard # -# $Id: localikiwikicreatesite,v 1.11 2008-02-13 13:09:26 jonas Exp $ +# $Id: localikiwikicreatesite,v 1.12 2008-02-13 15:26:54 jonas Exp $ # # Initialize ikiwiki site # @@ -85,9 +85,13 @@ DESTDIR=~/public_websites/$host DESTSRCDIR=~/public_websites/$srchost ## Init public RCS repositories -mkdir -p $DESTSRCDIR -GIT_DIR=$DESTSRCDIR/${project}_content.git git --bare init --shared -GIT_DIR=$DESTSRCDIR/$project.git git --bare init --shared +mkdir -p $DESTSRCDIR/${project}.git $DESTSRCDIR/${project}_content.git +(cd $DESTSRCDIR/${project}_content.git +git --bare init --shared +) +(cd $DESTSRCDIR/${project}.git +git --bare init --shared +) ## Create initial content mkdir -p $SRCDIR @@ -106,8 +110,7 @@ mkdir -p $CFGDIR cp /usr/share/doc/ikiwiki/html/ikiwiki.setup $CFGDIR ## Init content RCS -( -cd $SRCDIR +(cd $SRCDIR git init echo /.ikiwiki > .gitignore git add . @@ -119,8 +122,7 @@ chmod +x $DESTSRCDIR/${project}_content.git/hooks/post-update ) ## Init backend RCS -( -cd $CFGDIR +(cd $CFGDIR git init echo /content > .gitignore git add . @@ -142,9 +144,8 @@ perl -pi -e ' perl -0 -pi -e ' s,#{([\s#]*The git post-update wrapper[^}]*\s*)#(\s*wrapper =>\s*")[^"]*("\,\s*[^}]*)#(\s*wrappermode =>[^}]*)#},{$1$2'$DESTSRCDIR/${project}_content.git/hooks/post-update-$project'$3$4},; ' $CFGDIR/ikiwiki.setup -( perl -0 -pi -e 's,\n(exec\s[^\n]*),\nhooks/post-update-'"$project"'\n\n$1,' $DESTSRCDIR/${project}_content.git/hooks/post-update -cd $CFGDIR +(cd $CFGDIR git add ikiwiki.setup git commit -m "Adjust ikiwiki.setup to use actual paths, and add+enable Git post-update hooks" ) @@ -165,14 +166,12 @@ all: \$(underlays) cd \$@ && git remote add -f -t \$(master:LOCALE=\$(locale)) -m \$(master:LOCALE=\$(locale)) origin $gitsrcuri/${project}_\$@.git cd \$@ && git merge origin EOF -( -cd $CFGDIR +(cd $CFGDIR git add Makefile git commit -m "Setup local paths" ) ikiwiki --verbose $SRCDIR $DESTDIR --url=http://"$host" --setup $CFGDIR/ikiwiki.setup -( -cd $CFGDIR +(cd $CFGDIR git push ) -- cgit v1.2.3