#!/bin/sh # # 1) Edit the first paragraph to meet your configuration. # 2) Modify ports_list at your convenience. ports_tree_name="${1:-default}" ports_trees_location="/usr/local/poudriere/ports" pkgs_to_build="/usr/local/etc/poudriere.d/packages-to-build" location_of() { echo "$ports_trees_location/$ports_tree_name/$1" } # Cleaning the ports tree from previous patches ports_list="x11-drivers/xf86-video-intel foo/bar baz/qux " while [ -n "$ports_list" ] do port="$(echo $ports_list | awk -F' ' '{print $1}')" && echo "Cleaning $(location_of $port):" && echo "..." && svn delete --force --quiet "$(location_of $port)" && svn revert --recursive --remove-added --quiet "$(location_of $port)" && echo "Done." && echo && ports_list="$(echo $ports_list | awk -F' ' '{for (i=2; i<=NF; i++) print $i}')" done && unset port && # Updating the ports tree poudriere ports -p $ports_tree_name -u && # Patching the ports tree # echo "Patching x11-drivers/xf86-video-intel:" && echo "..." && bug_id=236003 attachment_id=$(scarab files -a $bug_id |grep jbeich@FreeBSD.org |grep intel.update.diff |tail -n 1 |awk -F' ' '{print $1}') && scarab fetch -o intel.update.diff $attachment_id && patch -Efsp1 -i "$PWD/intel.update.diff" -d "$ports_trees_location/$ports_tree_name" && rm intel.update.diff && echo "Done." && echo && # # echo "Patching foo/bar:" && echo "..." && # # # # echo "Patching baz/qux:" && echo "..." && # # # poudriere options -j 121-RELEASE-amd64 -p $ports_tree_name -n -C -f "$pkgs_to_build" && poudriere bulk -j 121-RELEASE-amd64 -p $ports_tree_name -f "$pkgs_to_build" && poudriere pkgclean -j 121-RELEASE-amd64 -p $ports_tree_name -f "$pkgs_to_build" && true