From c8ad32a39ed19828fe98c9d6838002653861d3e5 Mon Sep 17 00:00:00 2001 From: frsyuki Date: Mon, 5 Oct 2009 23:31:08 +0900 Subject: [PATCH] cpp: preprocess.sh: more verbose --- cpp/preprocess.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cpp/preprocess.sh b/cpp/preprocess.sh index 332dd9ca..2e06c100 100755 --- a/cpp/preprocess.sh +++ b/cpp/preprocess.sh @@ -1,8 +1,14 @@ #!/bin/sh preprocess() { - erb $1.erb > $1.tmp - mv $1.tmp $1 + ruby -r erb -e 'puts ERB.new(ARGF.read).result' $1.erb > $1.tmp + if [ "$?" != 0 ]; then + echo "" + echo "** preprocess failed **" + echo "" + else + mv $1.tmp $1 + fi } preprocess msgpack/type/tuple.hpp