view 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 source

#/bin/sh

# source definitions
. `dirname $0`/config/definition.sh

# functions

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

build() {
    ${build_command} build $1 -o `dirname $1` ${build_template_option}
}

build_slides() {
    target_list=`find $(dirname $0) -name "${build_target_filename}"`
    for target in ${target_list}; do
        build $target
    done
}


# main

command_check
build_slides