diff --git a/scripts/install b/scripts/install index dc66cb6..b1e9cc8 100644 --- a/scripts/install +++ b/scripts/install @@ -77,15 +77,17 @@ fi #================================================= # INSTALL DEPENDENCIES AND KODI #================================================= -if [[ $arch != arm* ]]; then - cp ../conf/kodi.list "/etc/apt/sources.list.d/${app}.list" - ynh_package_update - ynh_package_install xorg xinit dbus-x11 kodi +dependencies="" + +if [[ "$arch" != arm* ]]; then + cp ../conf/kodi.list "/etc/apt/sources.list.d/${app}.list" + dependencies="xorg xinit dbus-x11 kodi" else - ynh_package_update - ynh_package_install xserver-xorg-legacy xorg dbus-x11 kodi + dependencies="xserver-xorg-legacy xorg dbus-x11 kodi" fi +ynh_package_update +ynh_install_app_dependencies "$dependencies" #================================================= # X11 SETTINGS diff --git a/scripts/remove b/scripts/remove index cab73bf..8173781 100644 --- a/scripts/remove +++ b/scripts/remove @@ -68,14 +68,11 @@ ynh_replace_string "allowed_users=anybody" "allowed_users=console" /etc/X11/Xwra #================================================= # REMOVE DEPENDENCIES AND KODI #================================================= -if [[ $arch != arm* ]]; then - ynh_package_remove xorg xinit dbus-x11 kodi - ynh_secure_remove "/etc/apt/sources.list.d/${app}.list" - ynh_package_update -else - ynh_package_remove xserver-xorg-legacy xorg dbus-x11 kodi +if [[ "$arch" != arm* ]]; then + ynh_secure_remove "/etc/apt/sources.list.d/${app}.list" fi +ynh_remove_app_dependencies #================================================= # REMOVE APP MAIN DIR diff --git a/scripts/restore b/scripts/restore index 0219051..767f1d0 100644 --- a/scripts/restore +++ b/scripts/restore @@ -102,15 +102,17 @@ fi #================================================= # INSTALL DEPENDENCIES AND KODI #================================================= -if [[ $arch != arm* ]]; then - ynh_restore_file "/etc/apt/sources.list.d/${app}.list" - ynh_package_update - ynh_package_install xorg xinit dbus-x11 kodi +dependencies="" + +if [[ "$arch" != arm* ]]; then + cp ../conf/kodi.list "/etc/apt/sources.list.d/${app}.list" + dependencies="xorg xinit dbus-x11 kodi" else - ynh_package_update - ynh_package_install xserver-xorg-legacy xorg dbus-x11 kodi + dependencies="xserver-xorg-legacy xorg dbus-x11 kodi" fi +ynh_package_update +ynh_install_app_dependencies "$dependencies" #================================================= # X11 SETTINGS diff --git a/scripts/upgrade b/scripts/upgrade index 9988d1f..2b3ee12 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -78,16 +78,18 @@ ynh_add_systemd_config #================================================= # INSTALL DEPENDENCIES AND KODI #================================================= -if [[ "$arch" != arm* ]]; then - cp ../conf/kodi.list "/etc/apt/sources.list.d/${app}.list" - ynh_package_update - ynh_package_install xorg xinit dbus-x11 kodi -else - ynh_package_update - ynh_package_install xserver-xorg-legacy xorg dbus-x11 kodi +dependencies="" +if [[ "$arch" != arm* ]]; then + cp ../conf/kodi.list "/etc/apt/sources.list.d/${app}.list" + dependencies="xorg xinit dbus-x11 kodi" +else + dependencies="xserver-xorg-legacy xorg dbus-x11 kodi" fi +ynh_package_update +ynh_install_app_dependencies "$dependencies" + #================================================= # X11 SETTINGS