Last active
January 13, 2016 06:07
-
-
Save schlomok/866fc3ebfc00ca478ccd to your computer and use it in GitHub Desktop.
Installer Script for Dokuwiki (OS X)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: