diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/rssg | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -5,6 +5,7 @@ set -e current_date=$(date +"%a, %d %b %Y %H:%M:%S %z") +uname=$(uname) cat <<-EOF > "${rss_out_file}" <rss version="2.0"> @@ -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}" <item> |