From aba3baf4aa88546fc15c0c5e36e2ee2cef2088c4 Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Sun, 6 Aug 2017 22:01:11 +0900 Subject: [PATCH] update test.sh --- sprout/version.hpp | 3 +-- tools/testspr/test.sh | 10 ++++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sprout/version.hpp b/sprout/version.hpp index 7ed7a6a3..e47e8fbc 100644 --- a/sprout/version.hpp +++ b/sprout/version.hpp @@ -14,7 +14,6 @@ // SPROUT_VERSION_YYYYMMDD // (yyyyMMdd) // -#define SPROUT_VERSION_YYYYMMDD \ -20170806 +#define SPROUT_VERSION_YYYYMMDD 20170806 #endif // #ifndef SPROUT_VERSION_HPP diff --git a/tools/testspr/test.sh b/tools/testspr/test.sh index 53d78f83..b9720ccf 100755 --- a/tools/testspr/test.sh +++ b/tools/testspr/test.sh @@ -173,10 +173,12 @@ fi if [ ${use_version} -ne 0 ]; then script_dir=$(cd $(dirname $0); pwd) - version_path="${script_dir}/../../sprout/version.hpp" - sprout_version_yyyymmdd=`head -n 18 ${version_path} | tail -n 1` - sprout_copyright=`head -n 3 ${version_path} | tail -n 2` - echo "Sprout version (YYYYMMDD) = ${sprout_version_yyyymmdd}" + 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