2020-08-21 13:13:08 -06:00
|
|
|
#!/bin/sh
|
|
|
|
|
2021-01-16 09:38:30 -07:00
|
|
|
SERVER=cdn.openbsd.org
|
2020-08-21 13:13:08 -06:00
|
|
|
ITEM=$1
|
|
|
|
MACHINE=$(machine)
|
2021-01-11 10:16:23 -07:00
|
|
|
VER=snapshots
|
2020-08-21 13:13:08 -06:00
|
|
|
V=$(uname -r | sed 's/\.//')
|
2021-01-11 10:16:23 -07:00
|
|
|
[[ ! -z $2 ]] && MACHINE=$2
|
|
|
|
if [[ ! -z $3 ]]; then
|
|
|
|
VER=$3
|
|
|
|
V=$(echo $VER | sed 's/\.//')
|
|
|
|
fi
|
|
|
|
ftp -o "${PWD}/${ITEM}" "https://${SERVER}/pub/OpenBSD/${VER}/${MACHINE}/${ITEM}" && \
|
|
|
|
ftp -VM -o "${PWD}/SHA256.sig" "https://${SERVER}/pub/OpenBSD/${VER}/${MACHINE}/SHA256.sig"
|
2020-08-21 13:13:08 -06:00
|
|
|
|
|
|
|
signify -C -p "/etc/signify/openbsd-${V}-base.pub" -x SHA256.sig "${ITEM}"
|