-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_build.sh
executable file
·35 lines (32 loc) · 1.26 KB
/
test_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
#/bin/sh
function test {
echo "+ $@"
"$@"
local status=$?
if [ $status -ne 0 ]; then
exit $status
fi
return $status
}
GIT_VERSION=`git describe --tags`
rm -f build/linux-x64/CMakeCache.txt 2>&1 >/dev/null
if [ "$1" == "local" ]
then
set -e
test make lt2http TARGET_OS=linux TARGET_ARCH=x64 GIT_VERSION=${GIT_VERSION} CROSS_ROOT=/usr/ CROSS_TRIPLE=x86_64-linux-gnu
test chmod +x build/out/lt2http
test cp -rf build/out/lt2http $HOME/.kodi/addons/service.lt2http/resources/bin/linux-x64/
test cp -rf build/out/lt2http $HOME/.kodi/userdata/addon_data/service.lt2http/bin/linux-x64/
elif [ "$1" == "sanitize" ]
then
set -e
test make lt2http TARGET_OS=linux TARGET_ARCH=x64 GIT_VERSION=${GIT_VERSION} CROSS_ROOT=/usr/ CROSS_TRIPLE=x86_64-linux-gnu CMAKE_BUILD_TYPE=RelWithDebInfo
test chmod +x build/out/lt2http
test cp -rf build/out/lt2http $HOME/.kodi/addons/service.lt2http/resources/bin/linux-x64/
test cp -rf build/out/lt2http $HOME/.kodi/userdata/addon_data/service.lt2http/bin/linux-x64/
elif [ "$1" == "docker" ]
then
test make linux-x64
test cp -rf build/linux-x64/out/lt2http $HOME/.kodi/addons/service.lt2http/resources/bin/linux-x64/
test cp -rf build/linux-x64/out/lt2http $HOME/.kodi/userdata/addon_data/service.lt2http/bin/linux-x64/
fi