Compare commits

...

8 Commits

Author SHA1 Message Date
Mathias Vandaele
e0235ae4db
Merge bae216cc01 into b0da626506 2024-10-29 14:22:17 +07:00
Clémentine U. - curqui
bae216cc01
Update download-latest.sh 2024-03-07 14:32:06 +01:00
Mathias Vandaele
9cd43780dd
Correcting the code, was not exiting on error, only linux desktop should go through the test of C lib
fixing few error after test
2024-02-26 20:58:21 +01:00
Mathias Vandaele
c65d3d0314
Merge branch 'meilisearch:main' into enhancement-4379-script-correction-when-musl-present 2024-02-26 19:17:32 +01:00
Mathias Vandaele
311c2e4e88
Update download-latest.sh add support for eglibc and make error message more understanding 2024-02-05 22:32:44 +01:00
Mathias Vandaele
789842d64b
Merge branch 'meilisearch:main' into enhancement-4379-script-correction-when-musl-present 2024-02-05 19:48:20 +01:00
Clémentine U. - curqui
6ec0310ceb
Update download-latest.sh 2024-02-05 10:59:54 +01:00
Mathias Vandaele
8311a7e031
issue 4379
adapt the script to terminate on error in case the system is using bionic or MUSL
2024-02-01 21:34:20 +01:00

View File

@ -65,6 +65,30 @@ get_os() {
return 0 return 0
} }
# 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 [ "$os" != 'linux' ] ; then
return 0
fi
if ldd --version | grep -qi eglibc; then
c_lib='eglibc'
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
return 1
elif ldd --version | grep -qi bionic; then
c_library_failure_usage
return 1
else
return 1
fi
return 0
}
# Gets the architecture by setting the $archi variable. # Gets the architecture by setting the $archi variable.
# Returns 0 in case of success, 1 otherwise. # Returns 0 in case of success, 1 otherwise.
get_archi() { get_archi() {
@ -106,6 +130,13 @@ not_available_failure_usage() {
echo 'Follow the steps at the page ("Source" tab): https://www.meilisearch.com/docs/learn/getting_started/installation' echo 'Follow the steps at the page ("Source" tab): https://www.meilisearch.com/docs/learn/getting_started/installation'
} }
c_library_failure_usage() {
printf "$RED%s\n$DEFAULT" 'ERROR: Meilisearch is designed to work with certain C libraries, such as glibc. Ensure that your system uses a compatible C library environment.'
echo ''
echo 'However, you can easily compile the binary from the source files or using the docker image'
echo 'Follow the steps at the page ("Source" tab): https://www.meilisearch.com/docs/learn/getting_started/installation#local-installation'
}
fetch_release_failure_usage() { fetch_release_failure_usage() {
echo '' echo ''
printf "$RED%s\n$DEFAULT" 'ERROR: Impossible to get the latest stable version of Meilisearch.' printf "$RED%s\n$DEFAULT" 'ERROR: Impossible to get the latest stable version of Meilisearch.'
@ -134,6 +165,12 @@ fill_release_variables() {
not_available_failure_usage not_available_failure_usage
exit 1 exit 1
fi fi
# Fill $c_lib variable.
if ! get_C_library; then
c_library_failure_usage
exit 1
fi
} }
download_binary() { download_binary() {