1#!/bin/sh 2 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 8 9WIKI_TEST_DIR=$(cd"$(dirname "$0")"&&pwd) 10 11iftest -z"$WIKI_TEST_DIR" 12then 13 WIKI_TEST_DIR=. 14fi 15 16. "$WIKI_TEST_DIR"/test-gitmw-lib.sh 17usage () { 18echo"Usage: " 19echo" ./install-wiki.sh <install | delete | --help>" 20echo" install | -i : Install a wiki on your computer." 21echo" delete | -d : Delete the wiki and all its pages and " 22echo" content." 23} 24 25 26# Argument: install, delete, --help | -h 27case"$1"in 28"install"|"-i") 29 wiki_install 30exit0 31;; 32"delete"|"-d") 33 wiki_delete 34exit0 35;; 36"--help"|"-h") 37 usage 38exit0 39;; 40*) 41echo"Invalid argument:$1" 42 usage 43exit1 44;; 45esac