2019-07-17 13:37:18 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
BUILD_INFO=($(cat build_version.txt))
|
|
|
|
BUILD_FULL_NAME=${BUILD_INFO[0]}
|
|
|
|
BUILD_NAME=${BUILD_INFO[1]}
|
|
|
|
BUILD_VERSION=${BUILD_INFO[2]}
|
|
|
|
BUILD_FILENAME=${BUILD_INFO[3]}
|
|
|
|
|
|
|
|
echo "Creating TeaSpeak ${BUILD_NAME} Build index ${BUILD_VERSION}"
|
|
|
|
|
2019-11-11 15:37:28 -05:00
|
|
|
if [[ -d finalenv ]]; then
|
|
|
|
rm -r finalenv
|
|
|
|
fi
|
2019-07-17 13:37:18 -04:00
|
|
|
cp -r env finalenv
|
2019-11-11 15:37:28 -05:00
|
|
|
cd finalenv || {
|
|
|
|
echo "failed to enter dir"
|
|
|
|
exit 1
|
|
|
|
}
|
2019-07-17 13:37:18 -04:00
|
|
|
echo -e "# Version: ${BUILD_FULL_NAME}
|
|
|
|
# TeaSpeak version: ${BUILD_NAME}
|
|
|
|
# Build version: ${BUILD_VERSION}
|
|
|
|
|
|
|
|
{build_name: \"${BUILD_FULL_NAME}\", build_version: \"${BUILD_NAME}\", build_index: ${BUILD_VERSION}}" > buildVersion.txt
|
|
|
|
|
|
|
|
#Create a copy and save unstripped
|
|
|
|
cp TeaSpeakServer TeaSpeakServerTmp
|
|
|
|
rm TeaSpeakServer
|
|
|
|
mv TeaSpeakServerTmp TeaSpeakServer
|
|
|
|
|
2019-11-11 15:37:28 -05:00
|
|
|
#Copy libnice into place
|
|
|
|
if [[ -z ${build_os_type} || -z ${build_os_arch} ]]; then
|
|
|
|
echo "Missing build_os_type or build_os_arch."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
cp "../../../../libraries/libnice/${build_os_type}_${build_os_arch}/lib/libnice.so.10" ./libs/ || {
|
|
|
|
echo "failed to copy libnice"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2019-07-17 13:37:18 -04:00
|
|
|
strip -s -p -v TeaSpeakServer
|
|
|
|
tar --dereference -czvf "../${BUILD_FILENAME}" *
|
|
|
|
cd ..
|
2019-11-11 15:37:28 -05:00
|
|
|
#rm -r finalenv
|
|
|
|
#./make_symbol.sh
|
2019-07-17 13:37:18 -04:00
|
|
|
|
|
|
|
echo "Package created (${BUILD_FILENAME})"
|