forked from jmcgee-geon/LimeSDR_FEI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·48 lines (47 loc) · 1.35 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
if [ "$1" = "rpm" ]; then
# A very simplistic RPM build scenario
if [ -e LimeSDR_FEI.spec ]; then
mydir=`dirname $0`
tmpdir=`mktemp -d`
cp -r ${mydir} ${tmpdir}/LimeSDR_FEI-1.0.0
tar czf ${tmpdir}/LimeSDR_FEI-1.0.0.tar.gz --exclude=".svn" --exclude=".git" -C ${tmpdir} LimeSDR_FEI-1.0.0
rpmbuild -ta ${tmpdir}/LimeSDR_FEI-1.0.0.tar.gz
rm -rf $tmpdir
else
echo "Missing RPM spec file in" `pwd`
exit 1
fi
else
for impl in cpp ; do
if [ ! -d "$impl" ]; then
echo "Directory '$impl' does not exist...continuing"
continue
fi
cd $impl
if [ -e build.sh ]; then
if [ $# == 1 ]; then
if [ $1 == 'clean' ]; then
rm -f Makefile
rm -f config.*
./build.sh distclean
else
./build.sh $*
fi
else
./build.sh $*
fi
elif [ -e Makefile ] && [ Makefile.am -ot Makefile ]; then
make $*
elif [ -e reconf ]; then
./reconf && ./configure && make $*
else
echo "No build.sh found for $impl"
fi
retval=$?
if [ $retval != '0' ]; then
exit $retval
fi
cd -
done
fi