Skip to content

Instantly share code, notes, and snippets.

@schlomok
Last active January 13, 2016 06:07
Show Gist options
  • Save schlomok/866fc3ebfc00ca478ccd to your computer and use it in GitHub Desktop.
Save schlomok/866fc3ebfc00ca478ccd to your computer and use it in GitHub Desktop.
Installer Script for Dokuwiki (OS X)
# Install DokuWiki (OS X)
# Installs the following applications: Homebrew, brew-cask, gnu-tar, wget, mamp
install_dependencies() {
echo "Installing dependencies"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)";
brew update;
brew upgrade;
brew install caskroom/cask/brew-cask;
# Installing apps w/ order of dependency, and then alphabetical
brew install gnu-tar;
brew install wget;
# Installing MAMP
brew cask install mamp;
}
# 2. Install DokuWiki
# Installs DokuWiki in your current directory.
install_dokuwiki() {
install_dependencies
CUR_DIR=$(PWD)
DOKUWIKI_DIR_NAME=dokuwiki
DOKUWIKI_DIR=$CUR_DIR/dokuwiki
echo "Installing DokuWiki"
wget http://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz -O dokuwiki-stable.tgz;
mkdir -p $DOKUWIKI_DIR;
gtar -xzvf dokuwiki-stable.tgz -C $DOKUWIKI_DIR_NAME --strip-components=1;
rm dokuwiki-stable.tgz;
cd $DOKUWIKI_DIR;
ln -s $DOKUWIKI_DIR /Applications/MAMP/htdocs/$DOKUWIKI_DIR_NAME;
}
open_dokuwiki_installer() {
sh /Applications/MAMP/bin/start.sh;
open http://localhost:8888/dokuwiki/install.php
}
install() {
install_dokuwiki;
open_dokuwiki_installer;
}
install
@schlomok
Copy link
Author

What is this?

This is a gist to automate the installation of DokuWiki on OS X.

How do I install it?

Warning: Be in the directory you intend to install DokuWiki. This script creates a symbolic link in /Applications/MAMP/htdocs/ to wherever you currently are. If you intend to move your DokuWiki install, be sure to take care of this.

Run the following command:

sh -c $(curl https://gist.githubusercontent.com/schlomok/866fc3ebfc00ca478ccd/raw/2b0158ee9d839dc95fdf995eded5b57e95fb8912/install-dokuwiki-os-x.sh)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment