tests: worktree: retrofit "checkout --to" tests for "worktree add"
[git/git-svn.git] / contrib / mw-to-git / t / install-wiki.sh
blobc215213c4bfddb583fb3de0eb624e0cffdb8cc7c
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."
23 echo " start | -s : Start the previously configured lighttpd daemon"
24 echo " stop : Stop lighttpd daemon."
28 # Argument: install, delete, --help | -h
29 case "$1" in
30 "install" | "-i")
31 wiki_install
32 exit 0
34 "delete" | "-d")
35 wiki_delete
36 exit 0
38 "start" | "-s")
39 start_lighttpd
40 exit
42 "stop")
43 stop_lighttpd
44 exit
46 "--help" | "-h")
47 usage
48 exit 0
51 echo "Invalid argument: $1"
52 usage
53 exit 1
55 esac