diff options
author | Jonas Smedegaard <dr@jones.dk> | 2013-05-10 20:46:04 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2013-05-10 20:46:04 +0200 |
commit | 27d338dec0428bc22e2838eb8641c6e0d1681e22 (patch) | |
tree | 18eeb76e189ce03838dd9b23194f1c707b1eabbb /mkall |
Include mk* scripts
Diffstat (limited to 'mkall')
-rwxr-xr-x | mkall | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -0,0 +1,33 @@ +#!/bin/sh + +# process text(s) + +set -e + +# resolve options +eval set -- "$(getopt -s sh -o f -- "$@")" +while true; do case "$1" in -f) force=-f; shift;; --) shift; break;; esac; done + +. /lib/lsb/init-functions + +# fetch PDF files +./mkpdf $force "$@" + +# resolve stems from available PDF files if none provided +[ "$#" -gt 0 ] || eval set -- $(ls -1 *.pdf | sed 's/.pdf$//') + +# run tasks - either generic or with "_$stem" suffix +log_action_begin_msg "Apply tasks" +for stem in "$@"; do +# log_action_cont_msg $stem +# for task in pdf2txt txt2text slice; do +# for task in pdf2htm htm2html html2md md2mdwn slice; do + for task in pdf2htm htm2html; do +# log_action_cont_msg $task +# test ! -x $task-all || ./$task-all $force $stem + taskscript=mk$task-$stem + [ -x $taskscript ] || taskscript=mk$task-default + ./$taskscript $force $stem + done +done +log_action_end_msg $? |