2011-09-22 17:28:24 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# ZODIAC - a simple static site generator
|
2011-09-22 17:43:18 +02:00
|
|
|
# Copyright (c) 2011 Chase Allen James <nx-zodiac@nu-ex.com>
|
2011-09-22 17:28:24 +02:00
|
|
|
|
2011-10-06 23:28:51 +02:00
|
|
|
ZOD_LIB=ZODLIB_PATH
|
|
|
|
ZOD_PROJECT=$1
|
|
|
|
ZOD_TARGET=$2
|
2011-09-22 17:28:24 +02:00
|
|
|
|
2011-10-06 18:27:48 +02:00
|
|
|
_zod_error() {
|
|
|
|
echo -e ">>> ERROR: $*" >&2
|
|
|
|
exit 1
|
|
|
|
}
|
2011-09-22 17:28:24 +02:00
|
|
|
|
2011-10-06 23:28:51 +02:00
|
|
|
[ "$#" -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"
|
2011-09-22 17:28:24 +02:00
|
|
|
|
2011-10-06 23:28:51 +02:00
|
|
|
export ZOD_LIB ZOD_PROJECT ZOD_TARGET
|
2011-09-22 17:28:24 +02:00
|
|
|
|
2011-10-06 23:28:51 +02:00
|
|
|
find "$ZOD_PROJECT" -type f \
|
|
|
|
! -name "*.layout" \
|
|
|
|
! -name "*.meta" \
|
|
|
|
! -name "helpers.awk" \
|
|
|
|
-exec /home/nuex/_dev/zodiac/bin/zod_render {} \;
|