From 06bacf0cfb0abda88f89c4164aedb231300b7761 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Fri, 21 Aug 2020 13:13:08 -0600 Subject: [PATCH] add sfetch --- bin/sfetch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 bin/sfetch diff --git a/bin/sfetch b/bin/sfetch new file mode 100755 index 0000000..5cf65f5 --- /dev/null +++ b/bin/sfetch @@ -0,0 +1,11 @@ +#!/bin/sh + +SERVER=ftp3.usa.openbsd.org +ITEM=$1 +MACHINE=$(machine) +[[ ! -z $2 ]] && MACHINE=$2 +V=$(uname -r | sed 's/\.//') +ftp -o "${PWD}/${ITEM}" "https://${SERVER}/pub/OpenBSD/snapshots/${MACHINE}/${ITEM}" && \ +ftp -VM -o "${PWD}/SHA256.sig" "https://${SERVER}/pub/OpenBSD/snapshots/${MACHINE}/SHA256.sig" + +signify -C -p "/etc/signify/openbsd-${V}-base.pub" -x SHA256.sig "${ITEM}"