From 3d3228ddac3d54fa2d9030b6964db62fe146984d Mon Sep 17 00:00:00 2001 From: frju365 Date: Fri, 15 May 2020 20:42:59 +0200 Subject: [PATCH] little fix for architecture --- .idea/vcs.xml | 1 + scripts/_common.sh | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 4fce1d8..ca9a474 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -2,5 +2,6 @@ + \ No newline at end of file diff --git a/scripts/_common.sh b/scripts/_common.sh index 996cf9e..599d029 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -2,8 +2,24 @@ latest="v0.10.1" +ynh_detect_arch(){ + local architecture + if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep arm)" ]; then + architecture="armv8" + elif [ -n "$(uname -m | grep 64)" ]; then + architecture="amd64" + elif [ -n "$(uname -m | grep 86)" ]; then + architecture="i386" + elif [ -n "$(uname -m | grep arm)" ]; then + architecture="arm" + else + architecture="unknown" + fi + echo $architecture +} + installation_mailisearch() { - arch=$() + arch=$(ynh_detect_arch) url="" if [[ $arch = "amd64" ]] then