From 89ebbd64fe7d5b1055cc408c4e8feb29e61973dc Mon Sep 17 00:00:00 2001 From: frju365 Date: Fri, 15 May 2020 23:21:43 +0200 Subject: [PATCH] debug --- scripts/_common.sh | 15 --------------- scripts/install | 14 +++++++++++++- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 0e0275a..d2d57c9 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -17,18 +17,3 @@ ynh_detect_arch() { fi echo $architecture } - -ynh_installation_mailisearch() { - local arch=$(ynh_detect_arch) - local url="" - if [[ $arch = "amd64" ]] - then - url="meilisearch-linux-amd64" - elif [ $arch = "armv8"] - url="meilisearch-linux-armv8" - else - ynh_die --message="Your OS Architecture is not supported" - fi - curl https://github.com/meilisearch/MeiliSearch/releases/download/$latest/mailisearch-linux-$arch -O mailisearch - mv mailisearch /usr/bin/mailisearch -} diff --git a/scripts/install b/scripts/install index da9e10c..01ecf9e 100644 --- a/scripts/install +++ b/scripts/install @@ -80,7 +80,19 @@ ynh_app_setting_set --app=$app --key=port --value=$port ynh_script_progression --message="Installing mailisearch..." --time --weight=1 -ynh_installation_mailisearch +arch=$(ynh_detect_arch) +url="" +if [ $arch = "amd64" ] +then + url="meilisearch-linux-amd64" +elif [ $arch = "armv8"] + url="meilisearch-linux-armv8" +else + ynh_die --message="Your OS Architecture is not supported" +fi + +curl https://github.com/meilisearch/MeiliSearch/releases/download/$latest/mailisearch-linux-$arch -O mailisearch +mv mailisearch /usr/bin/mailisearch #=================================================