Mercurial > hg > Members > atton > seminar_slides
diff build.sh @ 6:f6d65d2a806f
Split const definitions into config/definition.sh
author | Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 30 Jan 2014 22:08:04 +0900 |
parents | ab0287707334 |
children | e0c4a349c94f |
line wrap: on
line diff
--- a/build.sh Thu Jan 30 22:00:36 2014 +0900 +++ b/build.sh Thu Jan 30 22:08:04 2014 +0900 @@ -1,27 +1,23 @@ #/bin/sh -# definition - -command="slideshow" -template_option="-t s6syntax" -target_filename="*.md" - +# source definitions +. `dirname $0`/config/definition.sh # functions command_check() { - if !(which ${command} >& /dev/null;) then - echo ${command} not found + if !(which ${build_command} >& /dev/null;) then + echo ${build_command} not found exit fi } build() { - ${command} build $1 -o `dirname $1` ${template_option} + ${build_command} build $1 -o `dirname $1` ${build_template_option} } build_slides() { - target_list=`find $(dirname $0) -name "${target_filename}"` + target_list=`find $(dirname $0) -name "${build_target_filename}"` for target in ${target_list}; do build $target done