Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > 30f3a81afac44676ed78176e02544bef > files > 7

mediawiki-1.16.5-59.fc13.src.rpm

#! /bin/sh

path="$1"

if dirname "$1" | grep '^[^/]' > /dev/null || test ! -d `dirname "$1"`; then
  cat >&2 <<EOF
$0: invalid parameter
Usage: $0 PATH
  PATH is the path of the instance's wiki root
  The parent directories must exist.
EOF
fi

if ! test -e "$path"; then
  mkdir "$path"
fi

if ! test -e "$path"/LocalSettings.php; then
  cp -a "@datadir@"/mediawiki/config "$path"
fi

if ! test -e "$path"/images; then
  mkdir "$path"/images
  chown apache:apache "$path"/images
fi
for f in index.php api.php opensearch_desc.php; do
  rm -f "$path"/$f
  ln -s "@datadir@"/mediawiki/$f "$path"/$f
done