changeset 4:ab0287707334

Support exec build scirpt in any working directory
author Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
date Thu, 30 Jan 2014 21:38:26 +0900
parents 198eeda53d23
children ba844bcb8b5e
files build.sh
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/build.sh	Thu Jan 30 15:36:47 2014 +0900
+++ b/build.sh	Thu Jan 30 21:38:26 2014 +0900
@@ -17,16 +17,19 @@
 }
 
 build() {
+    ${command} build $1 -o `dirname $1` ${template_option}
+}
 
-    ${command} build $1 -o `dirname $1` ${template_option}
+build_slides() {
+    target_list=`find $(dirname $0) -name "${target_filename}"`
+    for target in ${target_list}; do
+        build $target
+    done
 }
 
 
 # main
 
 command_check
+build_slides
 
-target_list=`find . -name "${target_filename}"`
-for target in ${target_list}; do
-    build $target
-done