diff --git a/testbin/AutoBuild_Linux.sh b/testbin/AutoBuild_Linux.sh index 65435489..ff890e68 100755 --- a/testbin/AutoBuild_Linux.sh +++ b/testbin/AutoBuild_Linux.sh @@ -1,19 +1,20 @@ #!/bin/bash -usage="this file must located in ../testbin/ based on our code structure " -echo $usage +CurDir="${PWD}" -CurDir=`pwd` -EncoderMakeDir="../codec/build/linux/enc/" -DecoderMakeDir="../codec/build/linux/dec/" -VPMakeDir="../processing/build/linux/" +if [ "$(basename ${CurDir})" != "testbin" ]; then + usage="This file must located in ../testbin/ based on our code structure" + echo ${usage} + exit 1 +fi -CodecBinDir="../codec/build/linux/bin/" +EncoderMakeDir="../codec/build/linux/enc" +DecoderMakeDir="../codec/build/linux/dec" +VPMakeDir="../processing/build/linux" + +CodecBinDir="../codec/build/linux/bin" VPBinDir="../bin/linux" -let "EncoderBuildFlag=1" -let "DecoderBuildFlag=1" -let "VPBuildFlag=1" MakefileLogFile="${CurDir}/CodecVPBuild.log" #************************************************ @@ -25,26 +26,10 @@ make >>${MakefileLogFile} cd ${CurDir} cd ${CodecBinDir} -if [ ! -e welsenc.a ] -then - let "EncoderBuildFlag=0" -fi - -if [ ! -e welsenc.so ] -then - let "EncoderBuildFlag=0" -fi - -if [ ! -e welsenc.exe ] -then - let "EncoderBuildFlag=0" -fi - -if [ "$EncoderBuildFlag" -eq 1 ] -then - echo "encoder build success!" +if [[ ! -e welsenc.a ]] || [[ ! -e welsenc.so ]] || [[ ! -e welsenc.exe ]]; then + echo "encoder build failed!" else - echo "encoder build failed!" + echo "encoder build success!" fi #************************************************ @@ -57,26 +42,10 @@ make >>${MakefileLogFile} cd ${CurDir} cd ${CodecBinDir} -if [ ! -e welsdec.a ] -then - let "DecoderBuildFlag=0" -fi - -if [ ! -e welsdec.so ] -then - let "DecoderBuildFlag=0" -fi - -if [ ! -e welsdec.exe ] -then - let "DecoderBuildFlag=0" -fi - -if [ "$DecoderBuildFlag" -eq 1 ] -then - echo "decoder build success!" +if [[ ! -e welsdec.a ]] || [[ ! -e welsdec.so ]] || [[ ! -e welsdec.exe ]]; then + echo "decoder build failed!" else - echo "decoder build failed!" + echo "decoder build success!" fi #************************************************ @@ -89,40 +58,12 @@ make >>${MakefileLogFile} cd ${CurDir} cd ${VPBinDir} -if [ ! -e libwelsvp.so ] -then - let "VPBuildFlag=0" -fi - -if [ "$VPBuildFlag" -eq 1 ] -then - echo "VP build success!" +if [ ! -e libwelsvp.so ]; then + echo "VP build failed!" else - echo "VP build failed!" + echo "VP build success!" fi - -#**************************** cd ${CurDir} -rm -f *.a *.exe *.so - -for file in ${CodecBinDir}/* -do - cp ${file} ./ - echo "file ${file} under ../openh264/bin/" -done - -for file in ${VPBinDir}/* -do - cp ${file} ./ - echo "file ${file} under ../openh264/bin/" -done - - - - - - - - - +echo "executables available in ../bin/linux" +echo "log file stored in ./CodecVPBuild.log" diff --git a/testbin/AutoClean_Linux.sh b/testbin/AutoClean_Linux.sh index 7210b780..4758fc1e 100755 --- a/testbin/AutoClean_Linux.sh +++ b/testbin/AutoClean_Linux.sh @@ -1,53 +1,41 @@ #!/bin/bash -usage="this file must located in ../testbin/ based on our code structure " -echo $usage +CurDir="${PWD}" -CurDir=`pwd` -EncoderMakeDir="../codec/build/linux/enc/" -DecoderMakeDir="../codec/build/linux/dec/" -VPMakeDir="../processing/build/linux/" +if [ "$(basename ${CurDir})" != "testbin" ]; then + usage="This file must located in ../testbin/ based on our code structure" + echo ${usage} + exit 1 +fi -CodecBinDir="../codec/build/linux/bin/" +EncoderMakeDir="../codec/build/linux/enc" +DecoderMakeDir="../codec/build/linux/dec" +VPMakeDir="../processing/build/linux" + +CodecBinDir="../codec/build/linux/bin" VPBinDir="../bin/linux" -let "EncoderBuildFlag=1" -let "DecoderBuildFlag=1" -let "VPBuildFlag=1" MakefileLogFile="${CurDir}/CodecVPBuild.log" #************************************************ #call Encoder make file -echo "encoder cleanning....." +echo "encoder cleaning....." cd ${EncoderMakeDir} -make clean >${MakefileLogFile} -#make >>${MakefileLogFile} - - +make clean #************************************************ #call Decoder make file -echo "decoder cleanning....." +echo "decoder cleaning....." cd ${CurDir} cd ${DecoderMakeDir} -make clean >>${MakefileLogFile} -#make >>${MakefileLogFile} - - +make clean #************************************************ #call VP make file -echo "VP cleanning....." +echo "VP cleaning....." cd ${CurDir} cd ${VPMakeDir} -make clean >>${MakefileLogFile} -#make >>${MakefileLogFile} +make clean cd ${CurDir} - -rm -f *.exe *.so *.a *.log -rm -fr ../bin # remove the bin directory - - - - +rm -f *.exe *.so *.a *.log ../bin