Merge branch 'da/mergetools-p4'
[git.git] / contrib / mw-to-git / t / install-wiki.sh
blobc6d6fa3aefafa8f782be20b7919f2acfc7667a6f
1 #!/bin/sh
3 # This script installs or deletes a MediaWiki on your computer.
4 # It requires a web server with PHP and SQLite running. In addition, if you
5 # do not have MediaWiki sources on your computer, the option 'install'
6 # downloads them for you.
7 # Please set the CONFIGURATION VARIABLES in ./test-gitmw-lib.sh
9 WIKI_TEST_DIR=$(cd "$(dirname "$0")" && pwd)
11 if test -z "$WIKI_TEST_DIR"
12 then
13 WIKI_TEST_DIR=.
16 . "$WIKI_TEST_DIR"/test-gitmw-lib.sh
17 usage () {
18 echo "Usage: "
19 echo " ./install-wiki.sh <install | delete | --help>"
20 echo " install | -i : Install a wiki on your computer."
21 echo " delete | -d : Delete the wiki and all its pages and "
22 echo " content."
26 # Argument: install, delete, --help | -h
27 case "$1" in
28 "install" | "-i")
29 wiki_install
30 exit 0
32 "delete" | "-d")
33 wiki_delete
34 exit 0
36 "--help" | "-h")
37 usage
38 exit 0
41 echo "Invalid argument: $1"
42 usage
43 exit 1
45 esac