From 78755e38ac0ab20cec1665473e9b4a9b7eeb9cb4 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 17 Oct 2007 02:09:03 +0000 Subject: Create content repository within config ditto. --- localikiwikicreatesite | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/localikiwikicreatesite b/localikiwikicreatesite index c49942e..abcb063 100755 --- a/localikiwikicreatesite +++ b/localikiwikicreatesite @@ -9,7 +9,7 @@ host=$1 srchost=${2:-source.$host} SRCDIR=~/private_webdata/$host/content -CFGDIR=~/private_webdata/$host/backend +CFGDIR=~/private_webdata/$host DESTDIR=~/public_websites/$host DESTSRCDIR=~/public_websites/$srchost @@ -50,6 +50,7 @@ git push --all ( cd $CFGDIR git init +echo /content > .gitignore git add . git commit -m "initial commit" git remote add origin $DESTSRCDIR/backend.git @@ -57,7 +58,7 @@ git config branch.master.merge refs/heads/master git push --all ) -## Adjust backend +## Adjust backend and add Makefile for further customization perl -pi -e ' s,^(\s*)#?(srcdir\s*=>\s*\")(.*)(\"\,\s*),$1$2'$SRCDIR'$4,; s,^(\s*)#?(destdir\s*=>\s*\")(.*)(\"\,\s*),$1$2'$DESTDIR'$4,; @@ -68,6 +69,23 @@ perl -pi -e ' ( cd $CFGDIR git add ikiwiki.setup +cat <$CFGDIR/Makefile +#underlays = basewiki smiley templates +underlays = templates +#locale = danish +master = master +#master = master-LOCALE + +all: $(underlays) + +$(underlays): + mkdir $@ + cd $@ && git init + cd $@ && git remote add -f -t $(master:LOCALE=$(locale)) -m $(master:LOCALE=$(locale)) origin http://source.jones.dk/ikiwiki_$@.git + cd $@ && git merge origin +EOF +echo /Makefile > .gitignore +git add Makefile git commit -m "Setup local paths" git push ) -- cgit v1.2.3