24 lines
656 B
Bash
24 lines
656 B
Bash
#!/bin/sh
|
|
|
|
# ZODIAC - a simple static site generator
|
|
# Copyright (c) 2011 Chase Allen James <nx-zodiac@nu-ex.com>
|
|
|
|
export ZOD_LIB=ZODLIB_PATH
|
|
export ZOD_PROJECT=$1
|
|
export ZOD_TARGET=$2
|
|
|
|
_zod_error() {
|
|
echo -e ">>> ERROR: $*" >&2
|
|
exit 1
|
|
}
|
|
|
|
[ "$#" -ne 2 ] && { echo "usage: zod projectdir targetdir"; exit; }
|
|
[ ! -d "$ZOD_PROJECT" ] && _zod_error "project directory does not exist"
|
|
[ ! -d "$ZOD_TARGET" ] && _zod_error "target directory does not exist"
|
|
|
|
find "$ZOD_PROJECT" -type f \
|
|
! -name "*.layout" \
|
|
! -name "*.meta" \
|
|
! -name "helpers.awk" \
|
|
-exec /home/nuex/_dev/zodiac/bin/zod_render {} \;
|