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 @@
1#!/bin/bash1#!/bin/bash
2 2
3usage="this file must located in ../testbin/ based on our code structure "3CurDir="${PWD}"
4echo $usage
5 4
6CurDir=`pwd`5if [ "$(basename ${CurDir})" != "testbin" ]; then
7EncoderMakeDir="../codec/build/linux/enc/"6 usage="This file must located in ../testbin/ based on our code structure"
8DecoderMakeDir="../codec/build/linux/dec/"7 echo ${usage}
9VPMakeDir="../processing/build/linux/"8 exit 1
9fi
10
11EncoderMakeDir="../codec/build/linux/enc"
12DecoderMakeDir="../codec/build/linux/dec"
13VPMakeDir="../processing/build/linux"
10 14
11CodecBinDir="../codec/build/linux/bin/"15CodecBinDir="../codec/build/linux/bin"
12VPBinDir="../bin/linux"16VPBinDir="../bin/linux"
13 17
14let "EncoderBuildFlag=1"
15let "DecoderBuildFlag=1"
16let "VPBuildFlag=1"
17MakefileLogFile="${CurDir}/CodecVPBuild.log"18MakefileLogFile="${CurDir}/CodecVPBuild.log"
18 19
19#************************************************20#************************************************
@@ -25,26 +26,10 @@ make >>${MakefileLogFile} · 5 unmodified lines
25 26
26cd ${CurDir}27cd ${CurDir}
27cd ${CodecBinDir}28cd ${CodecBinDir}
28if [ ! -e welsenc.a ]29if [[ ! -e welsenc.a ]] || [[ ! -e welsenc.so ]] || [[ ! -e welsenc.exe ]]; then
29then30 echo "encoder build failed!"
30 let "EncoderBuildFlag=0"
31fi
32
33if [ ! -e welsenc.so ]
34then
35 let "EncoderBuildFlag=0"
36fi
37
38if [ ! -e welsenc.exe ]
39then
40 let "EncoderBuildFlag=0"
41fi
42
43if [ "$EncoderBuildFlag" -eq 1 ]
44then
45 echo "encoder build success!"
46else31else
47 echo "encoder build failed!"32 echo "encoder build success!"
48fi33fi
49 34
50#************************************************35#************************************************
@@ -57,26 +42,10 @@ make >>${MakefileLogFile} · 6 unmodified lines
57 42
58cd ${CurDir}43cd ${CurDir}
59cd ${CodecBinDir}44cd ${CodecBinDir}
60if [ ! -e welsdec.a ]45if [[ ! -e welsdec.a ]] || [[ ! -e welsdec.so ]] || [[ ! -e welsdec.exe ]]; then
61then46 echo "decoder build failed!"
62 let "DecoderBuildFlag=0"
63fi
64
65if [ ! -e welsdec.so ]
66then
67 let "DecoderBuildFlag=0"
68fi
69
70if [ ! -e welsdec.exe ]
71then
72 let "DecoderBuildFlag=0"
73fi
74
75if [ "$DecoderBuildFlag" -eq 1 ]
76then
77 echo "decoder build success!"
78else47else
79 echo "decoder build failed!"48 echo "decoder build success!"
80fi49fi
81 50
82#************************************************51#************************************************
@@ -89,40 +58,12 @@ make >>${MakefileLogFile} · 6 unmodified lines
89 58
90cd ${CurDir}59cd ${CurDir}
91cd ${VPBinDir}60cd ${VPBinDir}
92if [ ! -e libwelsvp.so ]61if [ ! -e libwelsvp.so ]; then
93then62 echo "VP build failed!"
94 let "VPBuildFlag=0"
95fi
96
97if [ "$VPBuildFlag" -eq 1 ]
98then
99 echo "VP build success!"
100else63else
101 echo "VP build failed!"64 echo "VP build success!"
102fi65fi
103 66
104
105#****************************
106cd ${CurDir}67cd ${CurDir}
107rm -f *.a *.exe *.so68echo "executables available in ../bin/linux"
108 69echo "log file stored in ./CodecVPBuild.log"
109for file in ${CodecBinDir}/*
110do
111 cp ${file} ./
112 echo "file ${file} under ../openh264/bin/"
113done
114
115for file in ${VPBinDir}/*
116do
117 cp ${file} ./
118 echo "file ${file} under ../openh264/bin/"
119done
120
121
122
123
124
125
126
127
128
testbin/AutoClean_Linux.sh+18−30
@@ -1,53 +1,41 @@
1#!/bin/bash1#!/bin/bash
2 2
3usage="this file must located in ../testbin/ based on our code structure "3CurDir="${PWD}"
4echo $usage
5 4
6CurDir=`pwd`5if [ "$(basename ${CurDir})" != "testbin" ]; then
7EncoderMakeDir="../codec/build/linux/enc/"6 usage="This file must located in ../testbin/ based on our code structure"
8DecoderMakeDir="../codec/build/linux/dec/"7 echo ${usage}
9VPMakeDir="../processing/build/linux/"8 exit 1
9fi
10 10
11CodecBinDir="../codec/build/linux/bin/"11EncoderMakeDir="../codec/build/linux/enc"
12DecoderMakeDir="../codec/build/linux/dec"
13VPMakeDir="../processing/build/linux"
14
15CodecBinDir="../codec/build/linux/bin"
12VPBinDir="../bin/linux"16VPBinDir="../bin/linux"
13 17
14let "EncoderBuildFlag=1"
15let "DecoderBuildFlag=1"
16let "VPBuildFlag=1"
17MakefileLogFile="${CurDir}/CodecVPBuild.log"18MakefileLogFile="${CurDir}/CodecVPBuild.log"
18 19
19#************************************************20#************************************************
20#call Encoder make file21#call Encoder make file
21echo "encoder cleanning....."22echo "encoder cleaning....."
22cd ${EncoderMakeDir}23cd ${EncoderMakeDir}
23make clean >${MakefileLogFile}24make clean
24#make >>${MakefileLogFile}
25
26
27 25
28#************************************************26#************************************************
29#call Decoder make file27#call Decoder make file
30echo "decoder cleanning....."28echo "decoder cleaning....."
31cd ${CurDir}29cd ${CurDir}
32cd ${DecoderMakeDir}30cd ${DecoderMakeDir}
33make clean >>${MakefileLogFile}31make clean
34#make >>${MakefileLogFile}
35
36
37 32
38#************************************************33#************************************************
39#call VP make file34#call VP make file
40echo "VP cleanning....."35echo "VP cleaning....."
41cd ${CurDir}36cd ${CurDir}
42cd ${VPMakeDir}37cd ${VPMakeDir}
43make clean >>${MakefileLogFile}38make clean
44#make >>${MakefileLogFile}
45 39
46cd ${CurDir}40cd ${CurDir}
47 41rm -f *.exe *.so *.a *.log ../bin
48rm -f *.exe *.so *.a *.log
49rm -fr ../bin # remove the bin directory
50
51
52
53

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