#!/bin/sh # ZODIAC - a simple static site generator # Copyright (c) 2011 Chase Allen James zod_lib=ZODLIB_PATH proj="$1" target="$2" _zod_error() { echo -e ">>> ERROR: $*" >&2 exit 1 } [ "$#" -ne 2 ] && { echo "usage: zod projectdir targetdir"; exit; } [ ! -d "$proj" ] && _zod_error "project directory does not exist" [ ! -d "$target" ] && _zod_error "target directory does not exist" find "$proj" -type f \ ! -name "*.layout" \ ! -name "*.meta" \ ! -name "helpers.awk" \ -exec zod_render "$zod_lib" "$proj" "$target" {} \;