#!/bin/bash working_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # curl and php are required if ! which php >/dev/null; then echo "php is required!" exit 1 fi cd ${working_dir} generator="couscous.phar" # download the generator if it's not already downloaded if [ ! -f ${generator} ]; then curl -OS http://couscous.io/${generator} fi # generate the site php ${generator} generate # fix paths in generated files cd .couscous/generated for i in *; do if [ ! -f $i ]; then continue; fi sed -i 's@/css/@/docs/css/@g' $i sed -i 's@/fonts/@/docs/fonts/@g' $i sed -r 's@(