#!/bin/sh set -eu -o pipefail ports_tree=latest # update ports tree git -C /usr/local/poudriere/ports/latest restore :/ git -C /usr/local/poudriere/ports/latest clean -f poudriere ports -u -p "$ports_tree" > /dev/null for patch in /usr/local/etc/poudriere.d/patches/*.patch; do [ -f "$patch" ] || continue patch -s -d /usr/local/poudriere/ports/latest -u < "$patch" done for jail in "$@"; do poudriere jail -u -j "$jail" > /dev/null poudriere bulk -j "$jail" -f /usr/local/etc/poudriere.d/idm-pkglist -p "$ports_tree" -z idm > /dev/null poudriere pkgclean -j "$jail" -f /usr/local/etc/poudriere.d/idm-pkglist -p "$ports_tree" -z idm -y > /dev/null 2>&1 poudriere bulk -j "$jail" -f /usr/local/etc/poudriere.d/pkglist -p "$ports_tree" > /dev/null poudriere pkgclean -j "$jail" -f /usr/local/etc/poudriere.d/pkglist -p "$ports_tree" -y > /dev/null 2>&1 poudriere bulk -j "${jail}-i386" -f /usr/local/etc/poudriere.d/i386-pkglist -p "$ports_tree" > /dev/null poudriere pkgclean -j "${jail}-i386" -f /usr/local/etc/poudriere.d/i386-pkglist -p "$ports_tree" -y > /dev/null 2>&1 done poudriere distclean -p "$ports_tree" -a -y > /dev/null poudriere logclean -N 5 -p "$ports_tree" -y > /dev/null