# HG changeset patch # User Paul Boddie # Date 1225501930 -3600 # Node ID 8c4120a1be3c712d17743fe22b342d6291fcbfd4 # Parent ad360e4e0197371f3f1cec9aa1137b05c6cc15c2 Fixed script syntax. Enforced the need for arguments in the instsite and instwiki scripts. diff -r ad360e4e0197 -r 8c4120a1be3c README.txt --- a/README.txt Sat Oct 25 02:13:43 2008 +0200 +++ b/README.txt Sat Nov 01 02:12:10 2008 +0100 @@ -18,14 +18,14 @@ To set up the Wiki in the main MoinMoin configuration, examine farmconfig.py, then: -sudo ./instwiki +sudo ./instwiki /etc/moin (This copies the ep2008.py and farmconfig.py files; if either change subsequently, it will be necessary to copy them again.) To set up an Apache site for the Wiki, examine site-ep2008, then: -sudo ./instsite +sudo ./instsite /etc/apache2/sites-available Macros (if used) can be installed as follows: diff -r ad360e4e0197 -r 8c4120a1be3c initwiki --- a/initwiki Sat Oct 25 02:13:43 2008 +0200 +++ b/initwiki Sat Nov 01 02:12:10 2008 +0100 @@ -1,7 +1,7 @@ #!/bin/bash # Based on the documentation: /usr/share/doc/python-moinmoin/README.Debian.gz -if [ ! $1 ] ; then +if [[ ! $1 ]] ; then echo "Please specify a directory such as ../ep2008 or /tmp/ep2008." exit fi diff -r ad360e4e0197 -r 8c4120a1be3c instmacros --- a/instmacros Sat Oct 25 02:13:43 2008 +0200 +++ b/instmacros Sat Nov 01 02:12:10 2008 +0100 @@ -1,6 +1,6 @@ #!/bin/bash -if [ ! $1 ] ; then +if [[ ! $1 ]] ; then echo "Please specify a directory such as ../ep2008 or /tmp/ep2008." exit fi diff -r ad360e4e0197 -r 8c4120a1be3c instsite --- a/instsite Sat Oct 25 02:13:43 2008 +0200 +++ b/instsite Sat Nov 01 02:12:10 2008 +0100 @@ -1,5 +1,11 @@ #!/bin/bash # Based on the documentation: /usr/share/doc/python-moinmoin/README.Debian.gz -cp site-ep2008 /etc/apache2/sites-available/ep2008 +if [[ ! $1 ]] ; then + echo "Please specify a directory containing Apache site definitions such as" + echo "/etc/apache2/sites-available (used by Debian and Ubuntu)." + exit +fi + +cp site-ep2008 $1/ep2008 a2ensite ep2008 diff -r ad360e4e0197 -r 8c4120a1be3c insttheme --- a/insttheme Sat Oct 25 02:13:43 2008 +0200 +++ b/insttheme Sat Nov 01 02:12:10 2008 +0100 @@ -1,6 +1,6 @@ #!/bin/bash -if [ ! $1 ] ; then +if [[ ! $1 ]] ; then echo "Please specify a directory such as ../ep2008 or /tmp/ep2008." exit fi diff -r ad360e4e0197 -r 8c4120a1be3c instwiki --- a/instwiki Sat Oct 25 02:13:43 2008 +0200 +++ b/instwiki Sat Nov 01 02:12:10 2008 +0100 @@ -1,5 +1,11 @@ #!/bin/bash # Based on the documentation: /usr/share/doc/python-moinmoin/README.Debian.gz -mv /etc/moin/farmconfig.py /etc/moin/farmconfig.py.old -cp ep2008.py farmconfig.py /etc/moin +if [[ ! $1 ]] ; then + echo "Please specify the directory containing farmconfig.py, such as" + echo "/etc/moin (used by Debian and Ubuntu)." + exit +fi + +mv $1/farmconfig.py $1/farmconfig.py.old +cp ep2008.py farmconfig.py $1