Merge pull request #83 from varunbpatil/autobuildlinux_cleanup
Linux shell scripts refactored
This commit is contained in:
commit
cc2ffee5d2
@ -1,19 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
usage="this file must located in ../testbin/ based on our code structure "
|
CurDir="${PWD}"
|
||||||
echo $usage
|
|
||||||
|
|
||||||
CurDir=`pwd`
|
if [ "$(basename ${CurDir})" != "testbin" ]; then
|
||||||
EncoderMakeDir="../codec/build/linux/enc/"
|
usage="This file must located in ../testbin/ based on our code structure"
|
||||||
DecoderMakeDir="../codec/build/linux/dec/"
|
echo ${usage}
|
||||||
VPMakeDir="../processing/build/linux/"
|
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"
|
VPBinDir="../bin/linux"
|
||||||
|
|
||||||
let "EncoderBuildFlag=1"
|
|
||||||
let "DecoderBuildFlag=1"
|
|
||||||
let "VPBuildFlag=1"
|
|
||||||
MakefileLogFile="${CurDir}/CodecVPBuild.log"
|
MakefileLogFile="${CurDir}/CodecVPBuild.log"
|
||||||
|
|
||||||
#************************************************
|
#************************************************
|
||||||
@ -25,26 +26,10 @@ make >>${MakefileLogFile}
|
|||||||
|
|
||||||
cd ${CurDir}
|
cd ${CurDir}
|
||||||
cd ${CodecBinDir}
|
cd ${CodecBinDir}
|
||||||
if [ ! -e welsenc.a ]
|
if [[ ! -e welsenc.a ]] || [[ ! -e welsenc.so ]] || [[ ! -e welsenc.exe ]]; then
|
||||||
then
|
echo "encoder build failed!"
|
||||||
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!"
|
|
||||||
else
|
else
|
||||||
echo "encoder build failed!"
|
echo "encoder build success!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#************************************************
|
#************************************************
|
||||||
@ -57,26 +42,10 @@ make >>${MakefileLogFile}
|
|||||||
|
|
||||||
cd ${CurDir}
|
cd ${CurDir}
|
||||||
cd ${CodecBinDir}
|
cd ${CodecBinDir}
|
||||||
if [ ! -e welsdec.a ]
|
if [[ ! -e welsdec.a ]] || [[ ! -e welsdec.so ]] || [[ ! -e welsdec.exe ]]; then
|
||||||
then
|
echo "decoder build failed!"
|
||||||
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!"
|
|
||||||
else
|
else
|
||||||
echo "decoder build failed!"
|
echo "decoder build success!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#************************************************
|
#************************************************
|
||||||
@ -89,40 +58,12 @@ make >>${MakefileLogFile}
|
|||||||
|
|
||||||
cd ${CurDir}
|
cd ${CurDir}
|
||||||
cd ${VPBinDir}
|
cd ${VPBinDir}
|
||||||
if [ ! -e libwelsvp.so ]
|
if [ ! -e libwelsvp.so ]; then
|
||||||
then
|
echo "VP build failed!"
|
||||||
let "VPBuildFlag=0"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$VPBuildFlag" -eq 1 ]
|
|
||||||
then
|
|
||||||
echo "VP build success!"
|
|
||||||
else
|
else
|
||||||
echo "VP build failed!"
|
echo "VP build success!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
#****************************
|
|
||||||
cd ${CurDir}
|
cd ${CurDir}
|
||||||
rm -f *.a *.exe *.so
|
echo "executables available in ../bin/linux"
|
||||||
|
echo "log file stored in ./CodecVPBuild.log"
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,53 +1,41 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
usage="this file must located in ../testbin/ based on our code structure "
|
CurDir="${PWD}"
|
||||||
echo $usage
|
|
||||||
|
|
||||||
CurDir=`pwd`
|
if [ "$(basename ${CurDir})" != "testbin" ]; then
|
||||||
EncoderMakeDir="../codec/build/linux/enc/"
|
usage="This file must located in ../testbin/ based on our code structure"
|
||||||
DecoderMakeDir="../codec/build/linux/dec/"
|
echo ${usage}
|
||||||
VPMakeDir="../processing/build/linux/"
|
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"
|
VPBinDir="../bin/linux"
|
||||||
|
|
||||||
let "EncoderBuildFlag=1"
|
|
||||||
let "DecoderBuildFlag=1"
|
|
||||||
let "VPBuildFlag=1"
|
|
||||||
MakefileLogFile="${CurDir}/CodecVPBuild.log"
|
MakefileLogFile="${CurDir}/CodecVPBuild.log"
|
||||||
|
|
||||||
#************************************************
|
#************************************************
|
||||||
#call Encoder make file
|
#call Encoder make file
|
||||||
echo "encoder cleanning....."
|
echo "encoder cleaning....."
|
||||||
cd ${EncoderMakeDir}
|
cd ${EncoderMakeDir}
|
||||||
make clean >${MakefileLogFile}
|
make clean
|
||||||
#make >>${MakefileLogFile}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#************************************************
|
#************************************************
|
||||||
#call Decoder make file
|
#call Decoder make file
|
||||||
echo "decoder cleanning....."
|
echo "decoder cleaning....."
|
||||||
cd ${CurDir}
|
cd ${CurDir}
|
||||||
cd ${DecoderMakeDir}
|
cd ${DecoderMakeDir}
|
||||||
make clean >>${MakefileLogFile}
|
make clean
|
||||||
#make >>${MakefileLogFile}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#************************************************
|
#************************************************
|
||||||
#call VP make file
|
#call VP make file
|
||||||
echo "VP cleanning....."
|
echo "VP cleaning....."
|
||||||
cd ${CurDir}
|
cd ${CurDir}
|
||||||
cd ${VPMakeDir}
|
cd ${VPMakeDir}
|
||||||
make clean >>${MakefileLogFile}
|
make clean
|
||||||
#make >>${MakefileLogFile}
|
|
||||||
|
|
||||||
cd ${CurDir}
|
cd ${CurDir}
|
||||||
|
rm -f *.exe *.so *.a *.log ../bin
|
||||||
rm -f *.exe *.so *.a *.log
|
|
||||||
rm -fr ../bin # remove the bin directory
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user