refactoring

- keep using find-exec (more bin files)
- parse_convert command with spaces works
This commit is contained in:
nuex
2011-10-23 23:15:46 -04:00
parent ad7a86f1c5
commit 7be7041aa2
10 changed files with 148 additions and 129 deletions

24
bin/zod-render Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/sh
. zod-internal
zod_lib="$1"; shift
proj="$1"; shift
target="$1"; shift
file="$1"; shift
ext="${file##*.}"
meta="${file%.$ext}.meta"
page="${file##*/}"
page="${page%.$ext}.html"
destination=$(__zod_destination "$file")
set -- -f "$zod_lib/render.awk"
set -- "$@" -f "$zod_lib/config.awk"
[ -f "$proj/helpers.awk" ] && set -- "$@" -f "$proj/helpers.awk"
set -- "$@" -
[ -f "$proj/global.meta" ] && set -- "$@" "$proj/global.meta"
[ -f "$meta" ] && set -- "$@" "$meta"
set -- "$@" "$file"
[ -f "$proj/main.layout" ] && set -- "$@" "$proj/main.layout"
__zod_config | awk "$@" > "$destination/$page"