1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kodi_ynh.git synced 2024-09-03 19:26:34 +02:00

Removing ynh_detect_arch

This commit is contained in:
yalh76 2022-02-04 02:32:30 +01:00
parent ae0eb0cc72
commit 904ed93556
4 changed files with 4 additions and 31 deletions

View file

@ -19,30 +19,6 @@ package_check_dependencies="xserver-xorg-video-dummy"
# EXPERIMENTAL 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 86)" ]; then
architecture="i386"
elif [ -n "$(uname -m | grep arm)" ]; then
architecture="arm"
else
architecture="unknown"
fi
echo $architecture
}
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================

View file

@ -28,7 +28,6 @@ path_url=$YNH_APP_ARG_PATH
is_public=1
launch_on_boot=$YNH_APP_ARG_LAUNCH_ON_BOOT
open_webserver_port=$YNH_APP_ARG_OPEN_WEBSERVER_PORT
arch=$(ynh_detect_arch)
app=$YNH_APP_INSTANCE_NAME
@ -89,7 +88,7 @@ if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
pkg_dependencies="$pkg_dependencies $package_check_dependencies"
fi
if [[ $arch != arm* ]]; then
if [[ $YNH_ARCH != arm* ]]; then
ynh_install_app_dependencies $pkg_dependencies
else
ynh_install_app_dependencies $arm_pkg_dependencies
@ -133,7 +132,7 @@ mkdir -p "$final_path/.kodi/userdata/"
ynh_add_config --template="../conf/advancedsettings.xml" --destination="$final_path/.kodi/userdata/advancedsettings.xml"
mkdir -p "$final_path/.kodi/addons/"
if [[ $arch != arm* ]]; then
if [[ $YNH_ARCH != arm* ]]; then
ynh_setup_source --dest_dir="$final_path/.kodi/addons/" --source_id="arm-chorus2"
fi

View file

@ -33,7 +33,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
launch_on_boot=$(ynh_app_setting_get --app=$app --key=launch_on_boot)
open_webserver_port=$(ynh_app_setting_get --app=$app --key=open_webserver_port)
port=$(ynh_app_setting_get --app=$app --key=port)
arch=$(ynh_detect_arch)
#=================================================
# FIND AND OPEN A PORT
@ -94,7 +93,7 @@ if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
pkg_dependencies="$pkg_dependencies $package_check_dependencies"
fi
if [[ $arch != arm* ]]; then
if [[ $YNH_ARCH != arm* ]]; then
ynh_install_app_dependencies $pkg_dependencies
else
ynh_install_app_dependencies $arm_pkg_dependencies

View file

@ -22,7 +22,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
launch_on_boot=$(ynh_app_setting_get --app=$app --key=launch_on_boot)
open_webserver_port=$(ynh_app_setting_get --app=$app --key=open_webserver_port)
port=$(ynh_app_setting_get --app=$app --key=port)
arch=$(ynh_detect_arch)
#=================================================
# CHECK VERSION
@ -112,7 +111,7 @@ if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
pkg_dependencies="$pkg_dependencies $package_check_dependencies"
fi
if [[ $arch != arm* ]]; then
if [[ $YNH_ARCH != arm* ]]; then
ynh_install_app_dependencies $pkg_dependencies
else
ynh_install_app_dependencies $arm_pkg_dependencies