view build.sh @ 2:635d8af3f795

Fix build script, check command
author Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
date Thu, 30 Jan 2014 15:35:43 +0900
parents 5ceacb9a06c7
children ab0287707334
line wrap: on
line source

#/bin/sh

# definition

command="slideshow"
template_option="-t s6syntax"
target_filename="*.md"


# functions

command_check() {
    if !(which ${command} >& /dev/null;) then
        echo ${command} not found
        exit
    fi
}

build() {

    ${command} build $1 -o `dirname $1` ${template_option}
}


# main

command_check

target_list=`find . -name "${target_filename}"`
for target in ${target_list}; do
    build $target
done