#!/bin/sh suffix="$(uname -r)/packages/$(uname -m)" remote_path="$(cat /etc/installurl)/$suffix" local_path="$HOME/pub/OpenBSD/$suffix" mkdir -p "$local_path" PKG_PATH="$local_path:$remote_path" \ PKG_CACHE="$local_path" \ /usr/sbin/pkg_add "$@"