Correcting the code, was not exiting on error, only linux desktop should go through the test of C lib

fixing few error after test
This commit is contained in:
Mathias Vandaele 2024-02-26 19:41:32 +01:00
parent c65d3d0314
commit 9cd43780dd
No known key found for this signature in database
GPG Key ID: BFDD68D4E7C7198B

View File

@ -68,14 +68,21 @@ get_os() {
# Gets the C lib the system is using by setting the $c_lib variable.
# Returns 0 in case of success, 1 otherwise.
get_C_library(){
if ldd --version | grep -i glibc; then
c_lib='glibc'
elif ldd --version | grep -i eglibc; then
if [ "$os" != 'linux' ] ; then
return 0
fi
if ldd --version | grep -qi eglibc; then
c_lib='eglibc'
elif ldd --version | grep -i musl; then
return 0
elif ldd --version | grep -qi glibc; then
c_lib='glibc'
return 0
elif ldd --version | grep -qi musl; then
c_library_failure_usage
elif ldd --version | grep -i bionic; then
return 1
elif ldd --version | grep -qi bionic; then
c_library_failure_usage
return 1
else
return 1
fi
@ -161,6 +168,7 @@ fill_release_variables() {
# Fill $c_lib variable.
if ! get_C_library; then
c_library_failure_usage
exit 1
fi
}
@ -193,4 +201,4 @@ download_binary() {
main() {
download_binary
}
main
main