From 9d63ca99d03ce3116cd5e6ed92bda2b4753b51f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Tue, 25 Apr 2023 20:24:29 +0200 Subject: feat(bin): use common sha256 executable --- bin/rssg | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'bin/rssg') diff --git a/bin/rssg b/bin/rssg index 02e6b54..b8656c4 100755 --- a/bin/rssg +++ b/bin/rssg @@ -5,7 +5,6 @@ set -e current_date=$(date +"%a, %d %b %Y %H:%M:%S %z") -uname=$(uname) cat <<-EOF > "${rss_out_file}" @@ -28,13 +27,7 @@ for file in $(__list_files_date "${rss_dir}"); do title=$(__get_value_title "${file}") date=$(__get_value_date_publication "${file}") link="${website_link}/$(__get_final_filename "${file}")" - description=$(__generate_rss_body "${file}") - if [ "${uname}" = "Linux" ]; then - guid="$(echo "${link}" | sha256sum | cut -d ' ' -f 1)" - else - guid="$(echo "${link}" | sha256)" - fi - + guid="$(echo "${link}" | "${__sha256}" | cut -d ' ' -f 1)" cat <<-EOF >> "${rss_out_file}" ${title} -- cgit v1.2.3