# HG changeset patch # User Paul Boddie # Date 1197420033 -3600 # Node ID 48c22a63bf12582df2240b909efab8ad77b74912 # Parent 5a6832919b0a820f54236a6d5c788e7e3b135c96 Introduced a parameter for the Wiki root directory. diff -r 5a6832919b0a -r 48c22a63bf12 initwiki --- a/initwiki Wed Dec 12 01:08:04 2007 +0100 +++ b/initwiki Wed Dec 12 01:40:33 2007 +0100 @@ -1,9 +1,14 @@ #!/bin/bash # Based on the documentation: /usr/share/doc/python-moinmoin/README.Debian.gz -mkdir -p ../ep2008/www -cp -r /usr/share/moin/server/moin.cgi ../ep2008/www -cp -r /usr/share/moin/htdocs ../ep2008/ -mkdir -p ../ep2008/wiki -cp -r /usr/share/moin/data /usr/share/moin/underlay ../ep2008/wiki -chown -R www-data: ../ep2008/www ../ep2008/wiki +if [ ! $1 ] ; then + echo "Please specify a directory such as ../ep2008 or /tmp/ep2008." + exit +fi + +mkdir -p $1/www +cp -r /usr/share/moin/server/moin.cgi $1/www +cp -r /usr/share/moin/htdocs $1 +mkdir -p $1/wiki +cp -r /usr/share/moin/data /usr/share/moin/underlay $1/wiki +chown -R www-data: $1/www $1/wiki diff -r 5a6832919b0a -r 48c22a63bf12 instmacros --- a/instmacros Wed Dec 12 01:08:04 2007 +0100 +++ b/instmacros Wed Dec 12 01:40:33 2007 +0100 @@ -1,4 +1,9 @@ #!/bin/bash -cp macros/*.py ../ep2008/wiki/data/plugin/macro/ -chown www-data: ../ep2008/wiki/data/plugin/macro/*.py +if [ ! $1 ] ; then + echo "Please specify a directory such as ../ep2008 or /tmp/ep2008." + exit +fi + +cp macros/*.py $1/wiki/data/plugin/macro/ +chown www-data: $1/wiki/data/plugin/macro/*.py diff -r 5a6832919b0a -r 48c22a63bf12 insttheme --- a/insttheme Wed Dec 12 01:08:04 2007 +0100 +++ b/insttheme Wed Dec 12 01:40:33 2007 +0100 @@ -1,8 +1,13 @@ #!/bin/bash -mkdir -p ../ep2008/htdocs/ep2008 -cp -r themes/ep2008/css ../ep2008/htdocs/ep2008 -cp -r themes/ep2008/img ../ep2008/htdocs/ep2008 -chown -R www-data: ../ep2008/htdocs/ep2008 -cp themes/ep2008/ep2008.py ../ep2008/wiki/data/plugin/theme/ -chown www-data: ../ep2008/wiki/data/plugin/theme/ep2008.py +if [ ! $1 ] ; then + echo "Please specify a directory such as ../ep2008 or /tmp/ep2008." + exit +fi + +mkdir -p $1/htdocs/ep2008 +cp -r themes/ep2008/css $1/htdocs/ep2008 +cp -r themes/ep2008/img $1/htdocs/ep2008 +chown -R www-data: $1/htdocs/ep2008 +cp themes/ep2008/ep2008.py $1/wiki/data/plugin/theme/ +chown www-data: $1/wiki/data/plugin/theme/ep2008.py