~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to wiki/underlay/pages/HelpOnInstalling(2f)WikiInstanceCreation/attachments/createinstance.sh

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20080622211713-inlv5k4eifxckelr
ImportĀ upstreamĀ versionĀ 1.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
# path of MoinMoin shared files
 
4
SHARE=/usr/share/moin
 
5
 
 
6
# path to target instance location
 
7
INSTANCE=$1
 
8
 
 
9
# should be nice
 
10
USER=www-data
 
11
GROUP=www-data
 
12
 
 
13
if [ ! $1 ]
 
14
then
 
15
  echo "You must specify an instance (relative or absolute path)"
 
16
  exit
 
17
fi
 
18
 
 
19
if [[ -e $1 || -d $1 ]]
 
20
then
 
21
  echo "$1 already exists"
 
22
  exit
 
23
fi
 
24
 
 
25
mkdir -p $INSTANCE
 
26
cp -R $SHARE/data $INSTANCE
 
27
cp -R $SHARE/underlay $INSTANCE
 
28
cp $SHARE/config/wikiconfig.py $INSTANCE
 
29
 
 
30
chown -R $USER.$GROUP $INSTANCE
 
31
chmod -R ug+rwX $INSTANCE
 
32
chmod -R o-rwx $INSTANCE
 
33
 
 
34
if [ $? ]
 
35
then
 
36
  echo "Done."
 
37
fi
 
38