From 0220c9924c6fb633e7cd55be548a1604fdf4f63c Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 20 Aug 2024 21:02:00 -0300 Subject: Move scripts to other repositories (2) --- sri-hash | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100755 sri-hash (limited to 'sri-hash') diff --git a/sri-hash b/sri-hash deleted file mode 100755 index 5979c39..0000000 --- a/sri-hash +++ /dev/null @@ -1,34 +0,0 @@ -#/bin/sh -# -# SRI Hash Generator -# - -# Parameters -BASENAME="`basename $0`" -URI="$1" - -# Check -if [ -z "$URI" ]; then - echo "usage: $BASENAME " - exit 1 -fi - -# Get file -if echo "$URI" | grep -q '^http'; then - echo "downloading $URI and generating hash..." - HASH="`curl $URI | openssl dgst -sha384 -binary | openssl base64 -A`" - echo "" -else - if [ -e "$URI" ]; then - # See https://www.srihash.org/ - HASH="`openssl dgst -sha384 -binary $URI | openssl base64 -A`" - else - echo "file not found: $URI" - exit 1 - fi -fi - -# Generate -cat < -EOF -- cgit v1.2.3