Skip to content

Instantly share code, notes, and snippets.

@bdrewery
Created October 15, 2012 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bdrewery/3893832 to your computer and use it in GitHub Desktop.
Save bdrewery/3893832 to your computer and use it in GitHub Desktop.
My poudriere build script
#! /bin/sh
[ ${_FLOCKED:-0} -eq 0 ] && _FLOCKED=1 exec lockf -s -t0 /tmp/${0##*/}.lock $0 "$@" # Lock so it can only run once
which screen>/dev/null 2>&1 && test -z "${STY}" && exec screen -h 10000 -S ${0##*/} $0 "$@" # Ensure running in a screen
# Ensure the latest poudriere-devel is installed
portsnap fetch update
make -C /usr/ports/ports-mgmt/poudriere-devel/ build deinstall install clean > /dev/null
# Update poudriere ports checkout, and copy in my changes
poudriere ports -u -p default
rsync -avc -O --no-times /usr/local/share/system/usr/ports/ /tank/poudriere/ports/default/
set -e
# Build packages for my jails, using my set and list
for jail in 74i386 82i386 90amd64 90i386; do
/usr/bin/time poudriere bulk -f /usr/local/etc/poudriere.d/list.mine -z mine -j ${jail}
done
# Hold screen buffer until acknowledged
echo "DONE";read n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment