From abfa6082b42e8b0f76609dc7ecdc575e18716eb2 Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Mon, 23 Sep 2013 21:10:58 +0900 Subject: [PATCH] fix bashscript: add --compiler option --- testspr/test.sh | 2 +- tools/darkroom/darkcult.sh | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/testspr/test.sh b/testspr/test.sh index d2f7fafd..75ad798b 100755 --- a/testspr/test.sh +++ b/testspr/test.sh @@ -82,7 +82,7 @@ if [ ${use_help} -ne 0 ]; then fi echo "settings:" -echo " stagedir = \"${stagedir}\"" +echo " stagedir = '${stagedir}'" echo " gcc-version = (${gcc_version})" echo " clang-version = (${clang_version})" if [ ${#user_macros[*]} -gt 0 ]; then diff --git a/tools/darkroom/darkcult.sh b/tools/darkroom/darkcult.sh index 4108069d..d4f68118 100755 --- a/tools/darkroom/darkcult.sh +++ b/tools/darkroom/darkcult.sh @@ -12,6 +12,7 @@ src="../../example/darkroom/two_spheres.hpp" stagedir="darkroom" output="out.ppm" +compiler="g++" width=16 height=16 tile_width=16 @@ -23,7 +24,7 @@ include_paths=() force=0 use_help=0 -args=`getopt -o s:S:o:w:h:W:H:D:I:f -l source:,stagedir:,output:,width:,height:,tile-width:,tile-height:,define:,include:,force,help -- "$@"` +args=`getopt -o s:S:o:C:w:h:W:H:D:I:f -l source:,stagedir:,output:,compiler:,width:,height:,tile-width:,tile-height:,define:,include:,force,help -- "$@"` if [ "$?" -ne 0 ]; then echo >&2 "error: options parse error. see 'darkcult.sh --help'" exit 1 @@ -34,6 +35,7 @@ while [ -n "$1" ]; do -s|--source) src=$2; shift 2;; -S|--stagedir) stagedir=$2; shift 2;; -o|--output) output=$2; shift 2;; + -C|--compiler) compiler=$2; shift 2;; -w|--width) width=$2; shift 2;; -h|--height) height=$2; shift 2;; -W|--tile-width) tile_width=$2; shift 2;; @@ -59,6 +61,9 @@ if [ ${use_help} -ne 0 ]; then echo " -o, --output= Output file of the result." echo " Default; 'out.ppm'" echo "" + echo " -C, --compiler= Compiler to use." + echo " Default; 'g++'" + echo "" echo " -w, --width= Output width of rendering." echo " Default; 16" echo "" @@ -82,9 +87,10 @@ if [ ${use_help} -ne 0 ]; then fi echo "settings:" -echo " source = \"${src}\"" -echo " stagedir = \"${stagedir}\"" -echo " output = \"${output}\"" +echo " source = '${src}'" +echo " stagedir = '${stagedir}'" +echo " output = '${output}'" +echo " compiler = '${compiler}'" echo " width = ${width}" echo " height = ${height}" echo " tile-width = ${tile_width}" @@ -133,7 +139,7 @@ for ((y=0; y