Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #
- # Create a Python3 virtualenv for Hieroglyph slide decks on Mac OS X.
- # Author: Shane MacBride @shanemacbride
- #
- if !(test $1)
- then
- echo
- echo " Error: not enough arguments."
- echo " Usage: /slideDevelopment <nameOfVirtualEnvironment>"
- echo
- exit 1
- fi
- if (test $2)
- then
- echo
- echo " Error: too many arguments."
- echo " Usage: /slideDevelopment <nameOfVirtualEnvironment>"
- echo
- exit 1
- fi
- checkDependencies() {
- echo
- echo "Checking if $1 is installed..."
- which $1 > /dev/null
- if [ $? -eq 0 ]
- then
- echo "...true."
- echo
- else
- echo "...false."
- echo
- echo " Error: please install $1 to continue."
- echo
- exit 1
- fi
- }
- echo
- echo "Checking dependencies..."
- checkDependencies "python3"
- checkDependencies "virtualenv"
- echo "Creating $1..."
- virtualenv -p python3 $1
- echo "Activating $1..."
- source $1/bin/activate
- echo "Installing hieroglyph..."
- easy_install hieroglyph
- echo "Installing correct dependencies..."
- pip install "docutils==0.12"
- pip install "sphinx==1.4.1"
- echo "Running hieroglyph-quickstart..."
- hieroglyph-quickstart
- echo "Building slides..."
- make slides
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement