sfm

simple file manager
git clone git://git.afify.dev/sfm
Log | Files | Refs | README | LICENSE

commit ed84b1b703b88ab615f1665a9f938a137fa19339
parent 021e50d901ac37a3fa9cac1a7701ad33147253de
Author: afify <hassan@afify.dev>
Date:   Sat, 24 Jul 2021 18:50:58 +0300

[doc] update release download script

- add sha256 check
- portable sha256 command
- portable grep command

Diffstat:
MREADME.md | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md @@ -98,8 +98,14 @@ make install ``` **latest release** ```sh -wget $(curl -s https://git.afify.dev/sfm/tags.xml | grep --color=never -m 1 -o "\[v.*\]" | tr -d '[]'| awk '{print "https://git.afify.dev/sfm/releases/sfm-"$1".tar.gz"}') -tar -xzf sfm-*.tar.gz && cd sfm-*/ +[ "$(uname)" = "Linux" ] && shacmd="sha256sum" grepf="--color=never"|| shacmd="sha256" +latest=$(curl -s https://git.afify.dev/sfm/tags.xml | grep $grepf -m 1 -o "\[v.*\]" | tr -d '[]') +tgz="https://git.afify.dev/sfm/releases/sfm-${latest}.tar.gz" +sha="${tgz}.sha256" +wget "${tgz}" +wget "${sha}" +${shacmd} -c "sfm-${latest}.tar.gz.sha256" || exit +tar -xzf "sfm-${latest}.tar.gz" && cd "sfm-${latest}" || exit make make install ```