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:
parent
ae0eb0cc72
commit
904ed93556
4 changed files with 4 additions and 31 deletions
|
@ -19,30 +19,6 @@ package_check_dependencies="xserver-xorg-video-dummy"
|
||||||
# EXPERIMENTAL HELPERS
|
# 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
|
# FUTURE OFFICIAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -28,7 +28,6 @@ path_url=$YNH_APP_ARG_PATH
|
||||||
is_public=1
|
is_public=1
|
||||||
launch_on_boot=$YNH_APP_ARG_LAUNCH_ON_BOOT
|
launch_on_boot=$YNH_APP_ARG_LAUNCH_ON_BOOT
|
||||||
open_webserver_port=$YNH_APP_ARG_OPEN_WEBSERVER_PORT
|
open_webserver_port=$YNH_APP_ARG_OPEN_WEBSERVER_PORT
|
||||||
arch=$(ynh_detect_arch)
|
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
|
@ -89,7 +88,7 @@ if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
|
||||||
pkg_dependencies="$pkg_dependencies $package_check_dependencies"
|
pkg_dependencies="$pkg_dependencies $package_check_dependencies"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $arch != arm* ]]; then
|
if [[ $YNH_ARCH != arm* ]]; then
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
else
|
else
|
||||||
ynh_install_app_dependencies $arm_pkg_dependencies
|
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"
|
ynh_add_config --template="../conf/advancedsettings.xml" --destination="$final_path/.kodi/userdata/advancedsettings.xml"
|
||||||
|
|
||||||
mkdir -p "$final_path/.kodi/addons/"
|
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"
|
ynh_setup_source --dest_dir="$final_path/.kodi/addons/" --source_id="arm-chorus2"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -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)
|
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)
|
open_webserver_port=$(ynh_app_setting_get --app=$app --key=open_webserver_port)
|
||||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||||
arch=$(ynh_detect_arch)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# FIND AND OPEN A PORT
|
# FIND AND OPEN A PORT
|
||||||
|
@ -94,7 +93,7 @@ if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
|
||||||
pkg_dependencies="$pkg_dependencies $package_check_dependencies"
|
pkg_dependencies="$pkg_dependencies $package_check_dependencies"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $arch != arm* ]]; then
|
if [[ $YNH_ARCH != arm* ]]; then
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
else
|
else
|
||||||
ynh_install_app_dependencies $arm_pkg_dependencies
|
ynh_install_app_dependencies $arm_pkg_dependencies
|
||||||
|
|
|
@ -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)
|
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)
|
open_webserver_port=$(ynh_app_setting_get --app=$app --key=open_webserver_port)
|
||||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||||
arch=$(ynh_detect_arch)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK VERSION
|
# CHECK VERSION
|
||||||
|
@ -112,7 +111,7 @@ if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
|
||||||
pkg_dependencies="$pkg_dependencies $package_check_dependencies"
|
pkg_dependencies="$pkg_dependencies $package_check_dependencies"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $arch != arm* ]]; then
|
if [[ $YNH_ARCH != arm* ]]; then
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
else
|
else
|
||||||
ynh_install_app_dependencies $arm_pkg_dependencies
|
ynh_install_app_dependencies $arm_pkg_dependencies
|
||||||
|
|
Loading…
Add table
Reference in a new issue