From f5a20e3e0a23ea9770ca67ecc30b3dece70236e5 Mon Sep 17 00:00:00 2001 From: Bryan Black Date: Mon, 6 Nov 2017 22:50:49 -0800 Subject: [PATCH] sget init --- sget.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 sget.sh diff --git a/sget.sh b/sget.sh new file mode 100755 index 0000000..04bec99 --- /dev/null +++ b/sget.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +function getsecurefile() { +# cd to appropriate directory +wget -q $1 +wget -q $2 +fname=`basename $1` +if minisign -Vm $fname -P RWSmY4o5Bad1vS60aYAiQUswWYVV2EuSdqc3ry7CWWF1E6bVbFG9kR/y >/dev/null ; then +echo DEBUG: downloaded valid file $fname +return 0 +fi +# File failed signature check .... +echo DEBUG: downloaded file $fname failed signature check +mv $fname $fname.minisig /tmp +return 1 +} + +getsecurefile $1 $2 +#http://mutualparity.s3.amazonaws.com/test/fail.min.js http://mutualparity.s3.amazonaws.com/test/fail.min.js.minisig \ No newline at end of file