Commit c56308e2 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Merge branch 'v2.1.1-dev'

parents 3ef2a297 6aad2ffd
#!/bin/bash
#set -e
set -vx
function f_exit {
cd ${CURPWD}
unset TTCN_FILES
unset CC_FILES
unset CFG_FILES
unset EXECUTABLE
echo $1
exit $2
}
function f_usage {
echo "build.bash: This script import from External Disk the "
echo "Optional arguments:"
echo " prof: Generate a makefile including profiling options (e.g. ./build.bash prof)"
exit 0
}
clear
if [ "$1" == "help" ]
then
f_usage
fi
ATS_NAME=Mec
#CURPWD=`pwd`
if [ ! "${PWD##*/}" == "objs" ]
then
cd ../objs
if [ ! $? == 0 ]
then
echo "Please move to PROJECT/obj directory"
exit 1
fi
fi
# Remove everything
rm -fr ../objs/*.hh
rm -fr ../objs/*.cc
rm -fr ../objs/*.log
rm -fr ../objs/*.o
rm -fr ../objs/Makefile
# Remove useless files
find .. -type f -name "*~" -exec rm {} \;
find .. -type f -name "*.bak" -exec rm {} \;
find .. -type f -name "*.log" -exec rm {} \;
# Build JSON files if any and put them in objs directory
REFERENCES="LibCommon LibHttp LibMec LibMec/LocationAPI LibMec/UEidentityAPI LibMec/RnisAPI LibMec/BwManagementAPI LibMec/Ams LibMec/AppEna LibMec/AppLCM LibMec/Grant LibMec/FixedAccessInformationAPI LibMec/MeoPkgm LibMec/MepmPkgm LibMec/UEAppInterfaceAPI LibMec/UEidentityAPI"
for i in ${REFERENCES}
do
# TTCN code
for j in `find ${PATH_DEV_MEC}/src/$i/ttcn -type f -name "*.ttcn"`;
do
ln -sf $j ../ttcn/`basename $j`
done
# Include source code
files=`find ${PATH_DEV_MEC}/src/$i/include -type f`
if [ "${files}" != " " ]
then
for j in ${files};
do
ln -sf $j ../include/`basename $j`
done
fi
# CC source code
files=`find ${PATH_DEV_MEC}/src/$i/src -type f`
if [ "${files}" != " " ]
then
for j in ${files};
do
ln -sf $j ../src/`basename $j`
done
fi
done
# Generate the list of the TTCN-3 files
TTCN_FILES=`find .. -name '*.ttcn*'`
# Start ATS generation - Step 1
if [ "${OSTYPE}" == "cygwin" ]
then
rm ../bin/*.exe ../lib/*.dll
compiler.exe -b -e -f -g -l -L -M -n -O -t -r -R -U none -X ${TTCN_FILES} 2>&1 3>&1 | tee build.log
if [ "$?" == "1" ]
then
f_exit "Failed to compile ATS" 4
fi
else
compiler -b -e -f -g -l -L -M -n -O -t -r -R -U none -X ${TTCN_FILES} 2>&1 3>&1 | tee build.log
if [ "$?" == "1" ]
then
f_exit "Failed to generate ATS source code" 6
fi
fi
# Sart ATS generation - Step 2
# Create working variables
CC_FILES=`find ../src -name '*.c*'`
FWK_FILES=`find ${PATH_DEV_MEC}/framework/ -name '*.c*'`
CFG_FILES=`find ../etc -name '*.cfg'`
# Sart ATS generation - Step 3
if [ "${OSTYPE}" == "cygwin" ]
then
ttcn3_makefilegen.exe -d -f -g -m -M -R -U none -e Ats${ATS_NAME} ${TTCN_FILES} ${CC_FILES} ${FWK_FILES} ${CFG_FILES} | tee --append build.log
if [ "$?" == "1" ]
then
f_exit "Failed to compile ATS" 5
fi
else
ttcn3_makefilegen -d -f -g -m -M -R -U none -e Ats${ATS_NAME} ${TTCN_FILES} ${CC_FILES} ${FWK_FILES} ${CFG_FILES} | tee --append build.log
if [ "$?" == "1" ]
then
f_exit "Failed to generate ATS source code" 7
fi
fi
# Remove port skeletons to use src/<port skeletons>
for i in `ls ../include/*.hh`
do
if [ -f ./`basename $i` ]
then
rm ./`basename $i`
fi
done
for i in `ls ../src/*.cc`
do
if [ -f ./`basename $i` ]
then
rm ./`basename $i`
fi
done
# Check if Makefile was generated
if [ ! -f ./Makefile ]
then
f_exit "Failed to generate ATS source code" 8
fi
# Patch ATS generated files
#./bin/patch.bash 2>&1 3>&1 | tee --append build.log
# Add compiler/linker options
# -DASN_DISABLE_OER_SUPPORT is required for CAMCodec and DENMCodec
if [ "$1" == "prof" ]
then
if [ "${OSTYPE}" == "cygwin" ]
then
CXXFLAGS_DEBUG_MODE='s/-Wall/-pg -Wall -std=c++11 -fPIC -D_XOPEN_SOURCE=700 -DAS_USE_SSL -DENABLE_TRACE -pthreads -fstack-check -fstack-protector -fsanitize=leak -fsanitize=address -fno-omit-frame-pointer/g'
else
CXXFLAGS_DEBUG_MODE='s/-Wall/-pg -Wall -std=c++11 -fPIC -DAS_USE_SSL -DENABLE_TRACE -pthreads -fstack-check -fstack-protector -fsanitize=leak -fsanitize=address -fno-omit-frame-pointer/g'
fi
LDFLAGS_DEBUG_MODE='s/LDFLAGS = /LDFLAGS = -pg -pthread -fPIC -fstack-check -fstack-protector -fsanitize=leak -fsanitize=address -fno-omit-frame-pointer/g'
else
if [ "${OSTYPE}" == "cygwin" ]
then
CXXFLAGS_DEBUG_MODE='s/-Wall/-ggdb -O0 -Wall -std=c++11 -fPIC -DAS_USE_SSL -DENABLE_TRACE -D_XOPEN_SOURCE=700 -pthread -fstack-check -fstack-protector -fsanitize=leak -fsanitize=address -fno-omit-frame-pointer/g'
else
CXXFLAGS_DEBUG_MODE='s/-Wall/-ggdb -O0 -Wall -std=c++11 -fPIC -DAS_USE_SSL -DENABLE_TRACE -pthread -fstack-check -fstack-protector -fsanitize=leak -fsanitize=address -fno-omit-frame-pointer/g'
fi
LDFLAGS_DEBUG_MODE='s/LDFLAGS = /LDFLAGS = -g -pthread -fPIC -fstack-check -fstack-protector -fsanitize=leak -fsanitize=address -fno-omit-frame-pointer/g'
fi
ADD_INCLUDE='/CPPFLAGS = /a\\CPPFLAGS += -I/usr/local/share -I$(PATH_DEV_MEC)/include -I$(PATH_DEV_MEC)/framework/include -I../include -I../../LibMec/Common/include -I../../LibMec/include -I$(HOME_FRAMEWORKS)/osip/include -I$(HOME_INC) -I.'
ADD_LIBRARIES='s/LINUX_LIBS = -lxml2/LINUX_LIBS = -lrt -lxml2 -lpcap -lstdc++fs -lssl -L\$\(HOME_FRAMEWORKS\)\/osip\/src\/osipparser2\/\.libs -losipparser2/g'
sed --in-place "${CXXFLAGS_DEBUG_MODE}" ./Makefile
sed --in-place "${LDFLAGS_DEBUG_MODE}" ./Makefile
sed --in-place "${ADD_INCLUDE}" ./Makefile
sed --in-place "${ADD_LIBRARIES}" ./Makefile
# Update COMPILER_FLAGS
COMPILER_FLAGS='s/COMPILER_FLAGS = /COMPILER_FLAGS = -e -O /g'
sed --in-place "${COMPILER_FLAGS}" ./Makefile
# Update clean clause
CLEAN_LINE='s/$(RM) $(EXECUTABLE)/$(RM) ..\/bin\/$(EXECUTABLE) ..\/src\/*.o/g'
sed --in-place "${CLEAN_LINE}" ./Makefile
# Move binary file command
EXECUTABLE=MyExample
MV_CMD='s/all: $(TARGET) ;/all: $(TARGET) ; @if [ -f ..\/objs\/$(EXECUTABLE) ]; then mv ..\/objs\/$(EXECUTABLE) ..\/bin; fi ;/g'
sed --in-place "${MV_CMD}" ./Makefile
# Add run command
ADD_HOST='/PLATFORM = /aHOST=127.0.0.1'
ADD_PORT='/PLATFORM = /aPORT=12000'
sed --in-place "${ADD_PORT}" ./Makefile
sed --in-place "${ADD_HOST}" ./Makefile
ADD_RUN_LINE_1='$arun: all'
ADD_RUN_LINE_2='$a\\t@$(PWD)/../bin/$(EXECUTABLE) $(HOST) $(PORT)'
sed --in-place "${ADD_RUN_LINE_1}" ./Makefile
sed --in-place "${ADD_RUN_LINE_2}" ./Makefile
ADD_RUN_LINE_1='$arun_d: all'
ADD_RUN_LINE_2='$a\\t@gdb --args $(PWD)/../bin/$(EXECUTABLE) $(HOST) $(PORT)'
sed --in-place "${ADD_RUN_LINE_1}" ./Makefile
sed --in-place "${ADD_RUN_LINE_2}" ./Makefile
ADD_RUN_LINE_1='$arun_v: all'
ADD_RUN_LINE_2='$a\\t@valgrind -v --tool=memcheck --leak-check=yes --show-reachable=yes --track-fds=yes --run-cxx-freeres=yes $(PWD)/../bin/$(EXECUTABLE) $(HOST) $(PORT)'
sed --in-place "${ADD_RUN_LINE_1}" ./Makefile
sed --in-place "${ADD_RUN_LINE_2}" ./Makefile
# Add gendoc entry
ADD_RUN_LINE_1='$agendoc: ../docs/o2.cfg'
ADD_RUN_LINE_2='$a\\tdoxygen ../docs/o2.cfg'
sed --in-place "${ADD_RUN_LINE_1}" ./Makefile
sed --in-place "${ADD_RUN_LINE_2}" ./Makefile
# Build all
make all 2>&1 3>&1 | tee --append build.log
if [ "$?" == "1" ]
then
f_exit "Failed to generate ATS source code" 9
fi
export LD_LIBRARY_PATH=~/frameworks/osip/src/osipparser2/.libs:$LD_LIBRARY_PATH
../bin/Ats${ATS_NAME} -v
f_exit "Build done successfully" 0
#!/bin/bash
# Debug mode
#set -e
#set -vx
# Usage: sudo ./merge_mec_project.bash
# TODO Use git clone in temporary directory
OLDPWD=`pwd`
# Storing path
VAGRANT_DIR=~/tmp
if [ ! -d ${VAGRANT_DIR} ]
then
exit -1
else
VAGRANT_DIR=${VAGRANT_DIR}/to_be_merged
if [ -d ${VAGRANT_DIR} ]
then
rm -f ${VAGRANT_DIR}/*
else
mkdir ${VAGRANT_DIR}
fi
fi
chmod 775 ${VAGRANT_DIR}
# Execution path
RUN_PATH="${0%/*}"
PATH_DEV_MEC=`pwd`/../../etsi_mec
SRC_MEC_PATH=~/dev/STF569_Mec
# Update ETSI Framework files
echo 'Merging ETSI Framework files'
FWK_SRC_PATH=${SRC_MEC_PATH}/ccsrc
FWK_DST_PATH=${PATH_DEV_MEC}/framework
FWK_DIR_LIST_HH=`find ${FWK_SRC_PATH}/Protocols/ -name "*.h*" -type f`
for i in ${FWK_DIR_LIST_HH}
do
BN=`basename $i`
s1=`sha256sum -b $i | cut -d' ' -f1`
s2=`sha256sum -b ${FWK_DST_PATH}/include/${BN} | cut -d' ' -f1`
if [ "${s1}" != "${s2}" ]
then
cp ${FWK_DST_PATH}/include/${BN} ${VAGRANT_DIR}
if [ -f ${FWK_DST_PATH}/include/${BN}~ ]
then
rm ${FWK_DST_PATH}/include/${BN}~
fi
fi
done
FWK_DIR_LIST_CC=`find ${FWK_SRC_PATH}/Protocols/ -name "*.c*" -type f`
for i in ${FWK_DIR_LIST_CC}
do
BN=`basename $i`
s1=`sha256sum -b $i | cut -d' ' -f1`
s2=`sha256sum -b ${FWK_DST_PATH}/src/${BN} | cut -d' ' -f1`
if [ "${s1}" != "${s2}" ]
then
cp ${FWK_DST_PATH}/src/${BN} ${VAGRANT_DIR}
if [ -f ${FWK_DST_PATH}/src/${BN}~ ]
then
rm ${FWK_DST_PATH}/src/${BN}~
fi
fi
done
FWK_DIR_LIST_Y=`find ${FWK_SRC_PATH}/Protocols/ -name "*.y" -type f`
for i in ${FWK_DIR_LIST_Y}
do
BN=`basename $i`
s1=`sha256sum -b $i | cut -d' ' -f1`
s2=`sha256sum -b ${FWK_DST_PATH}/src/${BN} | cut -d' ' -f1`
if [ "${s1}" != "${s2}" ]
then
cp ${FWK_DST_PATH}/src/${BN} ${VAGRANT_DIR}
if [ -f ${FWK_DST_PATH}/src/${BN}~ ]
then
rm ${FWK_DST_PATH}/src/${BN}~
fi
fi
done
FWK_DIR_LIST_L=`find ${FWK_SRC_PATH}/Protocols/ -name "*.l" -type f`
for i in ${FWK_DIR_LIST_L}
do
BN=`basename $i`
s1=`sha256sum -b $i | cut -d' ' -f1`
s2=`sha256sum -b ${FWK_DST_PATH}/src/${BN} | cut -d' ' -f1`
if [ "${s1}" != "${s2}" ]
then
cp ${FWK_DST_PATH}/src/${BN} ${VAGRANT_DIR}
if [ -f ${FWK_DST_PATH}/src/${BN}~ ]
then
rm ${FWK_DST_PATH}/src/${BN}~
fi
fi
done
FWK_DIR_LIST_HH=`find ${FWK_SRC_PATH}/Framework/ -name "*.h*" -type f`
FWK_DIR_LIST_CC=`find ${FWK_SRC_PATH}/Framework/ -name "*.c*" -type f`
for i in ${FWK_DIR_LIST_HH}
do
BN=`basename $i`
s1=`sha256sum -b $i | cut -d' ' -f1`
s2=`sha256sum -b ${FWK_DST_PATH}/include/${BN} | cut -d' ' -f1`
if [ "${s1}" != "${s2}" ]
then
cp ${FWK_DST_PATH}/include/${BN} ${VAGRANT_DIR}
if [ -f ${FWK_DST_PATH}/include/${BN}~ ]
then
rm ${FWK_DST_PATH}/include/${BN}~
fi
fi
done
for i in ${FWK_DIR_LIST_CC}
do
BN=`basename $i`
s1=`sha256sum -b $i | cut -d' ' -f1`
s2=`sha256sum -b ${FWK_DST_PATH}/src/${BN} | cut -d' ' -f1`
if [ "${s1}" != "${s2}" ]
then
cp ${FWK_DST_PATH}/src/${BN} ${VAGRANT_DIR}
if [ -f ${FWK_DST_PATH}/src/${BN}~ ]
then
rm ${FWK_DST_PATH}/src/${BN}~
fi
fi
done
FWK_DIR_LIST_HH=`find ${FWK_SRC_PATH}/loggers/ -name "*.h*" -type f`
for i in ${FWK_DIR_LIST_HH}
do
BN=`basename $i`
s1=`sha256sum -b $i | cut -d' ' -f1`
s2=`sha256sum -b ${FWK_DST_PATH}/include/${BN} | cut -d' ' -f1`
if [ "${s1}" != "${s2}" ]
then
cp ${FWK_DST_PATH}/include/${BN} ${VAGRANT_DIR}
if [ -f ${FWK_DST_PATH}/include/${BN}~ ]
then
rm ${FWK_DST_PATH}/include/${BN}~
fi
fi
done
FWK_DIR_LIST_CC=`find ${FWK_SRC_PATH}/loggers/ -name "*.c*" -type f`
for i in ${FWK_DIR_LIST_CC}
do
BN=`basename $i`
s1=`sha256sum -b $i | cut -d' ' -f1`
s2=`sha256sum -b ${FWK_DST_PATH}/src/${BN} | cut -d' ' -f1`
if [ "${s1}" != "${s2}" ]
then
cp ${FWK_DST_PATH}/src/${BN} ${VAGRANT_DIR}
if [ -f ${FWK_DST_PATH}/src/${BN}~ ]
then
rm ${FWK_DST_PATH}/src/${BN}~
fi
fi
done
# Update ATS TTCN-3 files
echo 'Update TTCN-3 files'
TTCN_3_ORG_PATH=${SRC_MEC_PATH}/ttcn
TTCN_3_DST_PATH=${PATH_DEV_MEC}/src
TTCN_3_ATS_LIST='AtsMec LibMec LibMec/LocationAPI LibMec/UEidentityAPI LibMec/RnisAPI LibMec/BwManagementAPI LibHttp LibCommon'
for i in ${TTCN_3_ATS_LIST}
do
# TTCN-3 files
LIST_TTCN_FILES=`find ${TTCN_3_ORG_PATH}/$i -name "*.ttcn" -type f`
for j in ${LIST_TTCN_FILES}
do
BN=`basename $j`
s1=`sha256sum -b $j | cut -d' ' -f1`
s2=`sha256sum -b ${TTCN_3_DST_PATH}/$i/ttcn/${BN} | cut -d' ' -f1`
if [ "${s1}" != "${s2}" ]
then
cp ${TTCN_3_DST_PATH}/$i/ttcn/${BN} ${VAGRANT_DIR}
fi
done
# JSON files
LIST_TTCN_FILES=`find ${TTCN_3_ORG_PATH}/$i -name "*.json" -type f`
for j in ${LIST_TTCN_FILES}
do
BN=`basename $j`
s1=`sha256sum -b $j | cut -d' ' -f1`
s2=`sha256sum -b ${TTCN_3_DST_PATH}/$i/ttcn/${BN} | cut -d' ' -f1`
if [ "${s1}" != "${s2}" ]
then
cp ${TTCN_3_DST_PATH}/$i/json/${BN} ${VAGRANT_DIR}
fi
done
# Other files
if [ -f ${SRC_MEC_PATH}/docs/$i/o2.cfg ]
then
s1=`sha256sum -b ${PATH_DEV_MEC}/src/$i/docs/o2.cfg | cut -d' ' -f1`
s2=`sha256sum -b ${SRC_MEC_PATH}/docs/$i/o2.cfg | cut -d' ' -f1`
if [ "${s1}" != "${s2}" ]
then
mkdir -p ${VAGRANT_DIR}/docs/$i
cp ${PATH_DEV_MEC}/src/$i/docs/o2.cfg ${VAGRANT_DIR}/docs/$i
fi
fi
if [ -f ${SRC_MEC_PATH}/etc/$i/$i.cfg ]
then
s1=`sha256sum -b ${PATH_DEV_MEC}/src/$i/etc/$i.cfg | cut -d' ' -f1`
s2=`sha256sum -b ${SRC_MEC_PATH}/etc/$i/$i.cfg | cut -d' ' -f1`
if [ "${s1}" != "${s2}" ]
then
mkdir -p ${VAGRANT_DIR}/etc/$i
cp ${PATH_DEV_MEC}/src/$i/etc/%i.cfg ${VAGRANT_DIR}/etc/$i
fi
fi
done
TTCN_3_LIB_LIST='AtsMec'
for i in ${TTCN_3_LIB_LIST}
do
LIST_TTCN_FILES=`find ${TTCN_3_ORG_PATH}/$i -name "*.ttcn" -type f`
for j in ${LIST_TTCN_FILES}
do
BN=`basename $j`
s1=`sha256sum -b $j | cut -d' ' -f1`
s2=`sha256sum -b ${TTCN_3_DST_PATH}/$i/ttcn/${BN} | cut -d' ' -f1`
if [ "${s1}" != "${s2}" ]
then
cp ${TTCN_3_DST_PATH}/$i/ttcn/${BN} ${VAGRANT_DIR}
rm ${TTCN_3_DST_PATH}/$i/ttcn/${BN}~
fi
done
done
LIST_FILES=`find ${PATH_DEV_MEC} -name "*~" -type f`
for i in ${LIST_FILES}
do
BN=$i
BN=${BN:: -1} # Remove the last character
cp ${BN} ${VAGRANT_DIR}
rm $i
done
chmod -R 664 ${VAGRANT_DIR}/*.*
exit 0
......@@ -4,7 +4,11 @@
clear
export LD_LIBRARY_PATH=/home/${USER}/frameworks/osip/src/osipparser2/.libs:$LD_LIBRARY_PATH
if [ -z $ATS ]
then
echo "ATS shall be defined"
exit 1
fi
if ! [[ $1 =~ "^[0-9]+$" ]]
then
......@@ -13,26 +17,29 @@ else
COUNTER=1
fi
if [ $COUNTER == 0 ]
then
COUNTER=1
cd .. && make && cd -
fi
CURPWD=`pwd`
if [ ! "${PWD##*/}" == "objs" ]
if [ ! "${PWD##*/}" == "scripts" ]
then
cd ../objs
cd ../scripts
if [ ! $? == 0 ]
then
echo "Please move to PROJECT/obj directory"
echo "Please move to PROJECT/scripts directory"
exit 1
fi
fi
for i in `ls ../logs/merged.*.log`
do
rm -f $i
done
rm ../logs/$ATS/*.log
for i in $(seq 1 1 $COUNTER)
do
LD_LIBRARY_PATH=/home/${USER}/frameworks/osip/src/osipparser2/.libs:$LD_LIBRARY_PATH ../bin/run_mtc.bash &
LD_LIBRARY_PATH=/home/${USER}/frameworks/osip/src/osipparser2/.libs:$LD_LIBRARY_PATH ../bin/run_ptcs.bash $2
./run_mtc.bash &
./run_ptcs.bash
dup=$(ps -ef | grep "$0" | grep -v grep | wc -l)
while [ ${dup} -eq 3 ]
......@@ -41,8 +48,8 @@ do
dup=$(ps -ef | grep "$0" | grep -v grep | wc -l)
done
sleep 1
mv ../logs/merged.log ../logs/merged.`date +'%Y%m%d%S'`.log
mv ../logs/$ATS/merged.log ../logs/$ATS/merged.`date +'%Y%m%d%S'`.log
done
exit 0
......
#!/bin/bash
#set -evx
#set -e
#set -vx
clear
if [ -z $ATS ]
then
echo "ATS shall be defined"
exit 1
fi
CURPWD=`pwd`
if [ ! "${PWD##*/}" == "objs" ]
if [ ! "${PWD##*/}" == "scripts" ]
then
cd ../objs
cd ../scripts
if [ ! $? == 0 ]
then
echo "Please move to PROJECT/obj directory"
echo "Please move to PROJECT/scripts directory"
exit 1
fi
fi
TITAN_LOG_DIR=../logs
TITAN_LOG_DIR=../logs/$ATS
if [ ! -d ${TITAN_LOG_DIR} ]
then
mkdir ${TITAN_LOG_DIR}
......@@ -22,33 +29,20 @@ else
rm -f ${TITAN_LOG_DIR}/*.log
fi
CFG_FILES=`find ../etc -name '*.cfg'`
#LOG_FILES=`find ${TITAN_LOG_DIR} -name '*.log'`
#mv ${LOG_FILES} ../logs
#if [ "${OSTYPE}" == "cygwin" ]
#then
# # Remove dll
# rm ./*.dll
# ## Copy the new ones
# cp ~/lib/libhelper.dll .
# cp ~/lib/libconverter.dll .
# cp ~/lib/liblogger.dll .
# cp ~/lib/libttcn3_tri.dll .
# cp ~/lib/libcomm.dll .
#fi
CFG_FILES=`find ../etc/$ATS -name '*.cfg'`
echo "> cmtc: to create the MTC server"
echo "> smtc [module_name[[.control]|.testcase_name|.*]: when MyExample is connected, run the TCs in [EXECUTE] section"
echo "> emtc: Terminate MTC."
mctr ${CFG_FILES}
sudo chown -R `whoami` ${TITAN_LOG_DIR}
LOG_FILES=`find ${TITAN_LOG_DIR} -name '*.log'`
if [ "${TITAN_LOG_DIR}" != "" ]
then
ttcn3_logmerge -o ${TITAN_LOG_DIR}/merged.log ${LOG_FILES}
ttcn3_logformat -o ${TITAN_LOG_DIR}/merged_formated.log ${TITAN_LOG_DIR}/merged.log
mv ${TITAN_LOG_DIR}/merged_formated.log ${TITAN_LOG_DIR}/merged.log
mv ${TITAN_LOG_DIR}/merged_formated.log ${TITAN_LOG_DIR}/merged.log
echo "log files were merged into ${TITAN_LOG_DIR}/merged.log"
fi
......
#!/bin/bash
#set -evx
clear
CURPWD=`pwd`
if [ ! "${PWD##*/}" == "objs" ]
then
cd ../objs
if [ ! $? == 0 ]
then
echo "Please move to PROJECT/obj directory"
exit 1
fi
fi