#!/bin/bash # # Assembler # # Parameters BASENAME="`basename $0 | sed -e 's/\(.\)/\U\1/'`" DIRNAME="`dirname $0`" BASEDIR="$DIRNAME/.." SITE="site" NOTEBOOK="notebook" PUBLIC="public" # Cleanup the previous public folder rm -rf $PUBLIC # Check if there's a site folder if [ -e "$SITE" ]; then cp -a $SITE public if [ -e "compiled" ]; then mv compiled public/book fi else if [ -e "compiled" ]; then mv compiled public fi fi # Check if there's a notebook if [ -e "$NOTEBOOK" ]; then mv $NOTEBOOK public/notes fi