From 3a26cb0f1b60558e3a4d72ad6d7f253266bff754 Mon Sep 17 00:00:00 2001 From: antao Date: Tue, 2 Oct 2018 20:02:43 +0800 Subject: [PATCH] Update get_version.sh --- examples/simple_example/api_Attachment.cc | 4 ++-- get_version.sh | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/simple_example/api_Attachment.cc b/examples/simple_example/api_Attachment.cc index b77e10b7..837f217e 100644 --- a/examples/simple_example/api_Attachment.cc +++ b/examples/simple_example/api_Attachment.cc @@ -2,14 +2,14 @@ using namespace api; //add definition of your processing function here void Attachment::get(const HttpRequestPtr& req, - const std::function&callback) + const std::function&callback) { auto resp=HttpResponse::newHttpViewResponse("FileUpload",HttpViewData()); callback(resp); } void Attachment::upload(const HttpRequestPtr& req, - const std::function&callback) + const std::function&callback) { FileUpload fileUpload; fileUpload.parse(req); diff --git a/get_version.sh b/get_version.sh index 21889cf4..8bb3d2c2 100755 --- a/get_version.sh +++ b/get_version.sh @@ -3,15 +3,15 @@ GIT_VER=`git log|grep commit|wc -l|sed -e "s/^ *//"` MD5=`git log|head -1|awk '{printf $2}'` TMP_FILE=/tmp/version -echo "#define VERSION \"0.9.1.$GIT_VER\"" > $TMP_FILE -echo "#define VERSION_MD5 \"$MD5\"" >> $TMP_FILE +echo "#define VERSION \"0.9.1.$GIT_VER\"" > ${TMP_FILE} +echo "#define VERSION_MD5 \"$MD5\"" >> ${TMP_FILE} if [ ! -f $1 ];then -mv -f $TMP_FILE $1 +mv -f ${TMP_FILE} $1 else -diff $TMP_FILE $1 +diff ${TMP_FILE} $1 if [ $? -eq 1 ];then -mv -f $TMP_FILE $1 +mv -f ${TMP_FILE} $1 else -rm -f $TMP_FILE +rm -f ${TMP_FILE} fi fi