From 750beef3179a012aa53efc33455a643f6e31d378 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Mon, 21 May 2018 15:32:13 +0200 Subject: [PATCH] Use helper to download chorus2 --- conf/arm-chorus2.src | 6 ++++++ scripts/install | 7 +------ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 conf/arm-chorus2.src diff --git a/conf/arm-chorus2.src b/conf/arm-chorus2.src new file mode 100644 index 0000000..6be994e --- /dev/null +++ b/conf/arm-chorus2.src @@ -0,0 +1,6 @@ +SOURCE_URL=https://github.com/xbmc/chorus2/releases/download/2.4.4/webinterface.default.2.4.4.zip +SOURCE_SUM=efa76c18a155f263183df9eaa345e859f017000da064c35ec9809ff5c09e31c4 +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=zip +SOURCE_IN_SUBDIR=true +SOURCE_FILENAME= \ No newline at end of file diff --git a/scripts/install b/scripts/install index b1e9cc8..9ffd50f 100644 --- a/scripts/install +++ b/scripts/install @@ -29,8 +29,6 @@ open_webserver_port=$YNH_APP_ARG_OPEN_WEBSERVER_PORT #================================================= arch=$(uname -m) final_path=/var/www/$app -chorus2_package="https://github.com/xbmc/chorus2/releases/download/2.4.4/webinterface.default.2.4.4.zip" - test ! -e "$final_path" || ynh_die "This path already contains a folder" @@ -108,10 +106,7 @@ mkdir -p "$final_path/.kodi/userdata/" cp ../conf/advancedsettings.xml "$final_path/.kodi/userdata/advancedsettings.xml" if [[ $arch != arm* ]]; then - wget -q $chorus2_package -P /tmp - unzip /tmp/webinterface.default.2.4.4.zip -d /tmp/ - mkdir -p "$final_path/.kodi/addons/" - mv /tmp/webinterface.default/ "$final_path/.kodi/addons/webinterface.chorus2/" + ynh_setup_source "$final_path/.kodi/addons/" "arm-chorus2" fi chown -R "$app":"$app" "$final_path"