mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2024-11-12 21:09:01 +00:00
update darkcult.sh
This commit is contained in:
parent
aba3baf4aa
commit
8ac4d5c83f
2 changed files with 26 additions and 7 deletions
|
@ -29,11 +29,12 @@ max_procs=
|
||||||
force=0
|
force=0
|
||||||
continuable=0
|
continuable=0
|
||||||
runtime=0
|
runtime=0
|
||||||
|
use_version=0
|
||||||
use_help=0
|
use_help=0
|
||||||
darkcult_cpp=$(cd $(dirname $0); pwd)/darkcult.cpp
|
darkcult_cpp=$(cd $(dirname $0); pwd)/darkcult.cpp
|
||||||
darkcult_py=$(cd $(dirname $0); pwd)/darkcult.py
|
darkcult_py=$(cd $(dirname $0); pwd)/darkcult.py
|
||||||
|
|
||||||
args=`getopt -o s:S:o:C:w:h:W:H:l:t:r:b:O:D:I:P:fc -l source:,stagedir:,output:,compiler:,width:,height:,tile-width:,tile-height:,left:,top:,right:,bottom:,option:,define:,include:,max-procs:,force,continuable,runtime,help -- "$@"`
|
args=`getopt -o s:S:o:C:w:h:W:H:l:t:r:b:O:D:I:P:fc -l source:,stagedir:,output:,compiler:,width:,height:,tile-width:,tile-height:,left:,top:,right:,bottom:,option:,define:,include:,max-procs:,force,continuable,runtime,version,help -- "$@"`
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo >&2 "error: options parse error. See 'darkcult.sh --help'"
|
echo >&2 "error: options parse error. See 'darkcult.sh --help'"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -60,6 +61,7 @@ while [ -n "$1" ]; do
|
||||||
-f|--force) force=1; shift;;
|
-f|--force) force=1; shift;;
|
||||||
-c|--continuable) continuable=1; shift;;
|
-c|--continuable) continuable=1; shift;;
|
||||||
--runtime) runtime=1; shift;;
|
--runtime) runtime=1; shift;;
|
||||||
|
--version) use_version=1; shift;;
|
||||||
--help) use_help=1; shift;;
|
--help) use_help=1; shift;;
|
||||||
--) shift; break;;
|
--) shift; break;;
|
||||||
*) echo >&2 "error: unknown option($1) used."; exit 1;;
|
*) echo >&2 "error: unknown option($1) used."; exit 1;;
|
||||||
|
@ -69,8 +71,11 @@ done
|
||||||
: ${b:=${height}}
|
: ${b:=${height}}
|
||||||
|
|
||||||
if [ ${use_help} -ne 0 ]; then
|
if [ ${use_help} -ne 0 ]; then
|
||||||
echo "help:"
|
echo "overview:"
|
||||||
echo ""
|
echo " Sprout.Darkroom library split rendering script"
|
||||||
|
echo "usage:"
|
||||||
|
echo " darkcult.sh [options]"
|
||||||
|
echo "options:"
|
||||||
echo " -s, --source=<file> Indicates the source file."
|
echo " -s, --source=<file> Indicates the source file."
|
||||||
echo " Default; '../../example/darkroom/two_spheres.hpp'"
|
echo " Default; '../../example/darkroom/two_spheres.hpp'"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -125,10 +130,24 @@ if [ ${use_help} -ne 0 ]; then
|
||||||
echo ""
|
echo ""
|
||||||
echo " --runtime Enable runtime mode."
|
echo " --runtime Enable runtime mode."
|
||||||
echo ""
|
echo ""
|
||||||
|
echo " --version Show version."
|
||||||
|
echo ""
|
||||||
echo " --help This message."
|
echo " --help This message."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ${use_version} -ne 0 ]; then
|
||||||
|
script_dir=$(cd $(dirname $0); pwd)
|
||||||
|
version_hpp_path="${script_dir}/../../sprout/version.hpp"
|
||||||
|
sprout_version_yyyymmdd=`sed -n "s/[ \t]*#[ \t]*define[ \t]\+SPROUT_VERSION_YYYYMMDD[ \t]\+//p" ${version_hpp_path}`
|
||||||
|
sprout_copyright=`sed -n "/\/\*=/,/=\*\//s/^[ \t]\+/ /p" ${version_hpp_path}`
|
||||||
|
echo "version:"
|
||||||
|
echo " Sprout version (YYYYMMDD) = ${sprout_version_yyyymmdd}"
|
||||||
|
echo "copyright:"
|
||||||
|
echo "${sprout_copyright}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
echo "settings:"
|
echo "settings:"
|
||||||
echo " source = '${src}'"
|
echo " source = '${src}'"
|
||||||
echo " stagedir = '${stagedir}'"
|
echo " stagedir = '${stagedir}'"
|
||||||
|
|
|
@ -118,10 +118,10 @@ while [ -n "$1" ]; do
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ${use_help} -ne 0 ]; then
|
if [ ${use_help} -ne 0 ]; then
|
||||||
echo "overview: Sprout C++ libraries automatic test script"
|
echo "overview:"
|
||||||
echo ""
|
echo " Sprout C++ libraries automatic test script"
|
||||||
echo "usage: test.sh [options]"
|
echo "usage:"
|
||||||
echo ""
|
echo " test.sh [options]"
|
||||||
echo "options:"
|
echo "options:"
|
||||||
echo " -S, --stagedir=<dir> Output files here."
|
echo " -S, --stagedir=<dir> Output files here."
|
||||||
echo " Default; 'testspr'"
|
echo " Default; 'testspr'"
|
||||||
|
|
Loading…
Reference in a new issue