History

Merge pull request #83 from varunbpatil/autobuildlinux_cleanup

Linux shell scripts refactored

Ethan Hugg committed 12 years ago

Commit cc2ffee2 parents 8af6e5c 0e6f4932 files · +40 −111Browse files

Unified · Split

2 files
  1. testbin/AutoBuild_Linux.sh +22 −81
  2. testbin/AutoClean_Linux.sh +18 −30
testbin/AutoBuild_Linux.sh+22−81
@@ -1,19 +1,20 @@
11 #!/bin/bash
22
3−usage="this file must located in ../testbin/ based on our code structure "
4−echo $usage
3+CurDir="${PWD}"
54
6−CurDir=`pwd`
7−EncoderMakeDir="../codec/build/linux/enc/"
8−DecoderMakeDir="../codec/build/linux/dec/"
9−VPMakeDir="../processing/build/linux/"
5+if [ "$(basename ${CurDir})" != "testbin" ]; then
6+ usage="This file must located in ../testbin/ based on our code structure"
7+ echo ${usage}
8+ exit 1
9+fi
10+
11+EncoderMakeDir="../codec/build/linux/enc"
12+DecoderMakeDir="../codec/build/linux/dec"
13+VPMakeDir="../processing/build/linux"
1014
11−CodecBinDir="../codec/build/linux/bin/"
15+CodecBinDir="../codec/build/linux/bin"
1216 VPBinDir="../bin/linux"
1317
14−let "EncoderBuildFlag=1"
15−let "DecoderBuildFlag=1"
16−let "VPBuildFlag=1"
1718 MakefileLogFile="${CurDir}/CodecVPBuild.log"
1819
1920 #************************************************
@@ -25,26 +26,10 @@ make >>${MakefileLogFile} · 5 unmodified lines
2526
2627 cd ${CurDir}
2728 cd ${CodecBinDir}
28−if [ ! -e welsenc.a ]
29−then
30− let "EncoderBuildFlag=0"
31−fi
32−
33−if [ ! -e welsenc.so ]
34−then
35− let "EncoderBuildFlag=0"
36−fi
37−
38−if [ ! -e welsenc.exe ]
39−then
40− let "EncoderBuildFlag=0"
41−fi
42−
43−if [ "$EncoderBuildFlag" -eq 1 ]
44−then
45− echo "encoder build success!"
29+if [[ ! -e welsenc.a ]] || [[ ! -e welsenc.so ]] || [[ ! -e welsenc.exe ]]; then
30+ echo "encoder build failed!"
4631 else
47− echo "encoder build failed!"
32+ echo "encoder build success!"
4833 fi
4934
5035 #************************************************
@@ -57,26 +42,10 @@ make >>${MakefileLogFile} · 6 unmodified lines
5742
5843 cd ${CurDir}
5944 cd ${CodecBinDir}
60−if [ ! -e welsdec.a ]
61−then
62− let "DecoderBuildFlag=0"
63−fi
64−
65−if [ ! -e welsdec.so ]
66−then
67− let "DecoderBuildFlag=0"
68−fi
69−
70−if [ ! -e welsdec.exe ]
71−then
72− let "DecoderBuildFlag=0"
73−fi
74−
75−if [ "$DecoderBuildFlag" -eq 1 ]
76−then
77− echo "decoder build success!"
45+if [[ ! -e welsdec.a ]] || [[ ! -e welsdec.so ]] || [[ ! -e welsdec.exe ]]; then
46+ echo "decoder build failed!"
7847 else
79− echo "decoder build failed!"
48+ echo "decoder build success!"
8049 fi
8150
8251 #************************************************
@@ -89,40 +58,12 @@ make >>${MakefileLogFile} · 6 unmodified lines
8958
9059 cd ${CurDir}
9160 cd ${VPBinDir}
92−if [ ! -e libwelsvp.so ]
93−then
94− let "VPBuildFlag=0"
95−fi
96−
97−if [ "$VPBuildFlag" -eq 1 ]
98−then
99− echo "VP build success!"
61+if [ ! -e libwelsvp.so ]; then
62+ echo "VP build failed!"
10063 else
101− echo "VP build failed!"
64+ echo "VP build success!"
10265 fi
10366
104−
105−#****************************
10667 cd ${CurDir}
107−rm -f *.a *.exe *.so
108−
109−for file in ${CodecBinDir}/*
110−do
111− cp ${file} ./
112− echo "file ${file} under ../openh264/bin/"
113−done
114−
115−for file in ${VPBinDir}/*
116−do
117− cp ${file} ./
118− echo "file ${file} under ../openh264/bin/"
119−done
120−
121−
122−
123−
124−
125−
126−
127−
128−
68+echo "executables available in ../bin/linux"
69+echo "log file stored in ./CodecVPBuild.log"
testbin/AutoClean_Linux.sh+18−30
@@ -1,53 +1,41 @@
11 #!/bin/bash
22
3−usage="this file must located in ../testbin/ based on our code structure "
4−echo $usage
3+CurDir="${PWD}"
54
6−CurDir=`pwd`
7−EncoderMakeDir="../codec/build/linux/enc/"
8−DecoderMakeDir="../codec/build/linux/dec/"
9−VPMakeDir="../processing/build/linux/"
5+if [ "$(basename ${CurDir})" != "testbin" ]; then
6+ usage="This file must located in ../testbin/ based on our code structure"
7+ echo ${usage}
8+ exit 1
9+fi
1010
11−CodecBinDir="../codec/build/linux/bin/"
11+EncoderMakeDir="../codec/build/linux/enc"
12+DecoderMakeDir="../codec/build/linux/dec"
13+VPMakeDir="../processing/build/linux"
14+
15+CodecBinDir="../codec/build/linux/bin"
1216 VPBinDir="../bin/linux"
1317
14−let "EncoderBuildFlag=1"
15−let "DecoderBuildFlag=1"
16−let "VPBuildFlag=1"
1718 MakefileLogFile="${CurDir}/CodecVPBuild.log"
1819
1920 #************************************************
2021 #call Encoder make file
21−echo "encoder cleanning....."
22+echo "encoder cleaning....."
2223 cd ${EncoderMakeDir}
23−make clean >${MakefileLogFile}
24−#make >>${MakefileLogFile}
25−
26−
24+make clean
2725
2826 #************************************************
2927 #call Decoder make file
30−echo "decoder cleanning....."
28+echo "decoder cleaning....."
3129 cd ${CurDir}
3230 cd ${DecoderMakeDir}
33−make clean >>${MakefileLogFile}
34−#make >>${MakefileLogFile}
35−
36−
31+make clean
3732
3833 #************************************************
3934 #call VP make file
40−echo "VP cleanning....."
35+echo "VP cleaning....."
4136 cd ${CurDir}
4237 cd ${VPMakeDir}
43−make clean >>${MakefileLogFile}
44−#make >>${MakefileLogFile}
38+make clean
4539
4640 cd ${CurDir}
47−
48−rm -f *.exe *.so *.a *.log
49−rm -fr ../bin # remove the bin directory
50−
51−
52−
53−
41+rm -f *.exe *.so *.a *.log ../bin

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t