#!/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 setglobal WIKI_TEST_DIR = $[cd $[dirname $0] && pwd] if test -z $WIKI_TEST_DIR { setglobal WIKI_TEST_DIR = '.' } source "$WIKI_TEST_DIR"/test-gitmw-lib.sh proc usage { echo "usage: " echo " ./install-wiki.sh " echo " install | -i : Install a wiki on your computer." echo " delete | -d : Delete the wiki and all its pages and " echo " content." echo " start | -s : Start the previously configured lighttpd daemon" echo " stop : Stop lighttpd daemon." } # Argument: install, delete, --help | -h match $1 { with "install" | "-i" wiki_install exit 0 with "delete" | "-d" wiki_delete exit 0 with "start" | "-s" start_lighttpd exit with "stop" stop_lighttpd exit with "--help" | "-h" usage exit 0 with * echo "Invalid argument: $1" usage exit 1 }