Update lots of things

This commit is contained in:
Livvy Mackintosh
2017-06-16 18:06:22 +02:00
parent 90b508e3b0
commit 0811936382
23 changed files with 557 additions and 106 deletions

23
bin/sri-hash Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
usage="Usage: $(basename "$0") URL
Generate the subresource integrity hash (SRI) of URL.
--help display this help and exit"
seed=42
while getopts ':hs-help:' option; do
case "$option" in
h) echo "$usage"
exit
;;
:) printf "missing argument for -%s\n" "$OPTARG" >&2
echo "$usage" >&2
exit 1
;;
\?) printf "illegal option: -%s\n" "$OPTARG" >&2
echo "$usage" >&2
exit 1
;;
esac
done
echo sha384-$(curl -s $1 | openssl dgst -sha384 -binary | openssl enc -base64 -A)