sget/ubuntu-bash/sget.sh

18 lines
410 B
Bash
Raw Permalink Normal View History

2017-11-07 06:50:49 +00:00
#!/bin/bash
2017-11-07 16:42:28 +00:00
function sget() {
2017-11-07 06:50:49 +00:00
# cd to appropriate directory
2017-11-08 22:02:07 +00:00
wget -q $1
wget -q ${1}.minisig
2017-11-07 06:50:49 +00:00
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
}
2017-11-08 22:02:07 +00:00
sget $1