diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2023-04-25 20:24:29 +0200 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2023-05-03 14:21:51 +0200 |
commit | 9d63ca99d03ce3116cd5e6ed92bda2b4753b51f7 (patch) | |
tree | a3f8ec00da3941096af9e2f8dfbb2233ccb205fa /bin/func | |
parent | 1d625d1a3214e3eea5716ffd4460902359e7a240 (diff) | |
download | rgoncalves.se-9d63ca99d03ce3116cd5e6ed92bda2b4753b51f7.tar.gz |
feat(bin): use common sha256 executable
Diffstat (limited to 'bin/func')
-rw-r--r-- | bin/func | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -22,6 +22,12 @@ date_default_timezone="+0200" uname=$(uname) +__sha256="sha256" + +if [ "${uname}" = "Linux" ]; then + __sha256="sha256sum" +fi + __to_html_id() { cat /dev/stdin | sed 's/ /%20/g' } @@ -96,7 +102,7 @@ __get_out_filename() { _filename="${1}" if $(__get_value "${1}" draft || false); then - _filename="$(dirname ${1})/$(basename ${1} | sha256).html" + _filename="$(dirname ${1})/$(basename ${1} | "${__sha256}").html" fi echo "${_filename}" | |