File: install-wiki.sh

package info (click to toggle)
cgit 0.10.2.git2.0.1-3%2Bdeb8u1
  • links: PTS
  • area: main
  • in suites: jessie
  • size: 26,640 kB
  • ctags: 19,675
  • sloc: ansic: 159,238; sh: 129,259; perl: 29,890; tcl: 21,214; python: 5,362; makefile: 3,295; lisp: 1,786; php: 120; asm: 98; csh: 45
file content (45 lines) | stat: -rwxr-xr-x 926 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh

# This script installs or deletes a MediaWiki on your computer.
# It requires a web server with PHP and SQLite running. In addition, if you
# do not have MediaWiki sources on your computer, the option 'install'
# downloads them for you.
# Please set the CONFIGURATION VARIABLES in ./test-gitmw-lib.sh

WIKI_TEST_DIR=$(cd "$(dirname "$0")" && pwd)

if test -z "$WIKI_TEST_DIR"
then
	WIKI_TEST_DIR=.
fi

. "$WIKI_TEST_DIR"/test-gitmw-lib.sh
usage () {
	echo "usage: "
	echo "	./install-wiki.sh <install | delete | --help>"
	echo "		install | -i :	Install a wiki on your computer."
	echo "		delete | -d : Delete the wiki and all its pages and "
	echo "			content."
}


# Argument: install, delete, --help | -h
case "$1" in
	"install" | "-i")
		wiki_install
		exit 0
		;;
	"delete" | "-d")
		wiki_delete
		exit 0
		;;
	"--help" | "-h")
		usage
		exit 0
		;;
	*)
		echo "Invalid argument: $1"
		usage
		exit 1
		;;
esac