#!/usr/bin/env sh set -xe mkdir -p /tmp/openbsd_app/{stable,current} CURRENT_VER="7.52" STABLE_VER="7.52" CURRENT_FILE=${1:-/tmp/openbsd_app/current/share/sqlports} STABLE_FILE=${2:-/tmp/openbsd_app/stable/share/sqlports} SIGNIFY="${SIGNIFY:-signify}" CURRENT_PUB=$(readlink -f /etc/signify/openbsd-76-pkg.pub) STABLE_PUB=$(readlink -f /etc/signify/openbsd-76-pkg.pub) ( cd /tmp/openbsd_app/current curl -L -O https://cdn.openbsd.org/pub/OpenBSD/snapshots/packages/amd64/sqlports-${CURRENT_VER}.tgz curl -L -O https://cdn.openbsd.org/pub/OpenBSD/snapshots/packages/amd64/SHA256.sig ${SIGNIFY} -C -p ${CURRENT_PUB} -x SHA256.sig sqlports-${CURRENT_VER}.tgz tar -C . -zxvf sqlports-${CURRENT_VER}.tgz ) ( cd /tmp/openbsd_app/stable curl -L -O https://cdn.openbsd.org/pub/OpenBSD/7.6/packages/amd64/sqlports-${STABLE_VER}.tgz curl -L -O https://cdn.openbsd.org/pub/OpenBSD/7.6/packages/amd64/SHA256.sig ${SIGNIFY} -C -p ${STABLE_PUB} -x SHA256.sig sqlports-${STABLE_VER}.tgz tar -C . -zxvf sqlports-${STABLE_VER}.tgz ) SQL=$(cat <