1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/matterbridge_ynh.git synced 2024-09-03 19:36:24 +02:00

Merge pull request #21 from YunoHost-Apps/arch

arch helper
This commit is contained in:
Éric Gaspar 2021-12-12 19:17:24 +01:00 committed by GitHub
commit 34a8850bba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 3 additions and 29 deletions

View file

@ -20,7 +20,7 @@
"email": "liberodark@gmail.com"
},
"requirements": {
"yunohost": ">= 4.2.4"
"yunohost": ">= 4.3.0"
},
"multi_instance": false,
"services": [],

View file

@ -15,29 +15,3 @@
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================
# Check the architecture
#
# example: architecture=$(ynh_detect_arch)
#
# usage: ynh_detect_arch
#
# Requires YunoHost version 2.2.4 or higher.
ynh_detect_arch(){
local architecture
if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then
architecture="arm64"
elif [ -n "$(uname -m | grep 64)" ]; then
architecture="x86-64"
elif [ -n "$(uname -m | grep armv7)" ]; then
architecture="arm"
elif [ -n "$(uname -m | grep armv6)" ]; then
architecture="arm"
elif [ -n "$(uname -m | grep armv5)" ]; then
architecture="arm"
else
architecture="unknown"
fi
echo $architecture
}

View file

@ -20,7 +20,7 @@ ynh_abort_if_errors
#=================================================
# Retrieve arguments
architecture=$(ynh_detect_arch)
architecture=$YNH_ARCH
app=$YNH_APP_INSTANCE_NAME

View file

@ -17,7 +17,7 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
app=$YNH_APP_INSTANCE_NAME
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
architecture=$(ynh_detect_arch)
architecture=$YNH_ARCH
#=================================================
# CHECK VERSION