Mercurial > hg > Members > atton > seminar_slides
comparison 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 |
comparison
equal
deleted
inserted
replaced
5:ba844bcb8b5e | 6:f6d65d2a806f |
---|---|
1 #/bin/sh | 1 #/bin/sh |
2 | 2 |
3 # definition | 3 # source definitions |
4 | 4 . `dirname $0`/config/definition.sh |
5 command="slideshow" | |
6 template_option="-t s6syntax" | |
7 target_filename="*.md" | |
8 | |
9 | 5 |
10 # functions | 6 # functions |
11 | 7 |
12 command_check() { | 8 command_check() { |
13 if !(which ${command} >& /dev/null;) then | 9 if !(which ${build_command} >& /dev/null;) then |
14 echo ${command} not found | 10 echo ${build_command} not found |
15 exit | 11 exit |
16 fi | 12 fi |
17 } | 13 } |
18 | 14 |
19 build() { | 15 build() { |
20 ${command} build $1 -o `dirname $1` ${template_option} | 16 ${build_command} build $1 -o `dirname $1` ${build_template_option} |
21 } | 17 } |
22 | 18 |
23 build_slides() { | 19 build_slides() { |
24 target_list=`find $(dirname $0) -name "${target_filename}"` | 20 target_list=`find $(dirname $0) -name "${build_target_filename}"` |
25 for target in ${target_list}; do | 21 for target in ${target_list}; do |
26 build $target | 22 build $target |
27 done | 23 done |
28 } | 24 } |
29 | 25 |