From f620526e38f9f550dec2ca174085ab9f67f687a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Tue, 14 Dec 2021 20:05:05 +0000 Subject: bin/rssg: Add Linux switch for sha256 sum --- bin/rssg | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/rssg b/bin/rssg index 59f0797..f153b0e 100755 --- a/bin/rssg +++ b/bin/rssg @@ -5,6 +5,7 @@ set -e current_date=$(date +"%a, %d %b %Y %H:%M:%S %z") +uname=$(uname) cat <<-EOF > "${rss_out_file}" @@ -27,7 +28,11 @@ 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})" - guid="$(echo ${link} | sha256)" + if [ "${uname}" = "Linux" ]; then + guid="$(echo ${link} | sha256sum)" + else + guid="$(echo ${link} | sha256)" + fi cat <<-EOF >> "${rss_out_file}" -- cgit v1.2.3