From d30f5b1bef7a054355fab1eb1a8859b22bfae0c3 Mon Sep 17 00:00:00 2001 From: singh08prashant Date: Tue, 31 Aug 2021 08:34:21 +0530 Subject: [PATCH] add scrpit for git-bash --- download-latest.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/download-latest.sh b/download-latest.sh index 03d705b7b..1c3a2a6cd 100644 --- a/download-latest.sh +++ b/download-latest.sh @@ -6,7 +6,6 @@ GREEN='\033[32m' DEFAULT='\033[0m' # GLOBALS -BINARY_NAME='meilisearch' GREP_SEMVER_REGEXP='v\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)$' # i.e. v[number].[number].[number] # FUNCTIONS @@ -127,6 +126,9 @@ get_os() { 'Linux') os='linux' ;; + 'MINGW'*) + os='windows' + ;; *) return 1 esac @@ -180,7 +182,17 @@ if ! get_archi; then fi echo "Downloading MeiliSearch binary $latest for $os, architecture $archi..." -release_file="meilisearch-$os-$archi" +case "$os" in + 'windows') + release_file="meilisearch-$os-$archi.exe" + BINARY_NAME='meilisearch.exe' + + ;; + *) + release_file="meilisearch-$os-$archi" + BINARY_NAME='meilisearch' + +esac link="https://github.com/meilisearch/MeiliSearch/releases/download/$latest/$release_file" curl -OL "$link" mv "$release_file" "$BINARY_NAME"