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