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." 23echo" start | -s : Start the previously configured lighttpd daemon" 24echo" stop : Stop lighttpd daemon." 25} 26 27 28# Argument: install, delete, --help | -h 29case"$1"in 30"install"|"-i") 31 wiki_install 32exit0 33;; 34"delete"|"-d") 35 wiki_delete 36exit0 37;; 38"start"|"-s") 39 start_lighttpd 40exit 41;; 42"stop") 43 stop_lighttpd 44exit 45;; 46"--help"|"-h") 47 usage 48exit0 49;; 50*) 51echo"Invalid argument:$1" 52 usage 53exit1 54;; 55esac