You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by GitBox <gi...@apache.org> on 2019/03/06 12:46:03 UTC

[GitHub] [trafodion] xiaozhongwang commented on a change in pull request #1810: add a scripts to make trafodion build easily and Visualized

xiaozhongwang commented on a change in pull request #1810: add a scripts to make trafodion build easily and Visualized
URL: https://github.com/apache/trafodion/pull/1810#discussion_r262924198
 
 

 ##########
 File path: build_easily.sh
 ##########
 @@ -0,0 +1,67 @@
+#!/bin/sh
+log_dir=$TRAF_HOME/../../"build_logs"
+
+function process(){
+    component_name=$1
+    cmd=$2
+    log_file=$3
+    make_path=$4
+    printf "[%-30s]........................[\e[33m%s\e[0m]\r" "building $component_name" "waiting"
+    cd $make_path
+    #echo $log_file
+    ret=$($cmd > "$log_dir/$log_file" 2>&1;echo $?)
+#    ret=0
+    if [ 0 -eq $ret ]; then
+        printf "[%-30s]...................................[\e[32m%s\e[0m]\r\n" "build $component_name" "ok"
+    else
+        printf "[%-30s]...................................[\e[31m%s\e[0m]\r\n" "build $component_name" "failed"
+        printf "\e[31mBUILD FAILED\e[0m\n"
+        exit 1
+    fi
+
+}
+
+if [ ! -d $log_dir ];then
+    mkdir $log_dir
+fi
+
+if [ ! -d $log_dir/"foundation" ];then
+    mkdir $log_dir/"foundation"
+fi
+
+#export LC_ALL=en_US.UTF-8
+cd $TRAF_HOME/../
+./bldenvchk.sh;
+export SQ_BUILD_TYPE=debug
 
 Review comment:
   you can use debug as default, and developer can change it via parameter.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services