From dfbca6874e2df97f0b9e31c7561927622869b6e2 Mon Sep 17 00:00:00 2001 From: oleole39 <59071673+oleole39@users.noreply.github.com> Date: Mon, 19 Feb 2024 22:29:06 +0100 Subject: [PATCH] change variable name to circumvent linter bug https://github.com/YunoHost/package_linter/pull/129 --- scripts/change_url | 2 +- scripts/install | 4 ++-- scripts/upgrade | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 81e6351..7df80c9 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -10,7 +10,7 @@ source _common.sh source /usr/share/yunohost/helpers upstream_source_url=$(ynh_read_manifest --manifest_key="resources.sources.main.url") -source_filename=$(basename $upstream_source_url) +filename_sourcefile=$(basename $upstream_source_url) index_page=$(basename -s .zip $upstream_source_url).html #this variable will also populate the template tag __INDEX_PAGE__ in nginx.conf #================================================= diff --git a/scripts/install b/scripts/install index 7f79b93..1053fd7 100755 --- a/scripts/install +++ b/scripts/install @@ -10,7 +10,7 @@ source _common.sh source /usr/share/yunohost/helpers upstream_source_url=$(ynh_read_manifest --manifest_key="resources.sources.main.url") -source_filename=$(basename $upstream_source_url) +filename_sourcefile=$(basename $upstream_source_url) index_page=$(basename -s .zip $upstream_source_url).html #this variable will also populate the template tag __INDEX_PAGE__ in nginx.conf #================================================= @@ -21,7 +21,7 @@ index_page=$(basename -s .zip $upstream_source_url).html #this variable will als ynh_script_progression --message="Setting up source files..." --weight=10 ynh_setup_source --dest_dir="$install_dir" -ynh_replace_string --match_string="$source_filename" --replace_string="$upstream_source_url" --target_file="$install_dir/$index_page" #replace link to local source file with link to upstream source file +ynh_replace_string --match_string="$filename_sourcefile" --replace_string="$upstream_source_url" --target_file="$install_dir/$index_page" #replace link to local source file with link to upstream source file chown -R $app:www-data "$install_dir" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 81e0906..34207b8 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers upgrade_type=$(ynh_check_app_version_changed) upstream_source_url=$(ynh_read_manifest --manifest_key="resources.sources.main.url") -source_filename=$(basename $upstream_source_url) +filename_sourcefile=$(basename $upstream_source_url) index_page=$(basename -s .zip $upstream_source_url).html #this variable will also populate the template tag __INDEX_PAGE__ in nginx.conf #================================================= @@ -25,7 +25,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=10 ynh_setup_source --dest_dir="$install_dir" - ynh_replace_string --match_string="$source_filename" --replace_string="$upstream_source_url" --target_file="$install_dir/$index_page" #replace link to local source file with link to upstream source file + ynh_replace_string --match_string="$filename_sourcefile" --replace_string="$upstream_source_url" --target_file="$install_dir/$index_page" #replace link to local source file with link to upstream source file chown -R $app:www-data "$install_dir" fi