#!/bin/bash set -e cd "${0%/*}" for pkg in p5-*/Pkgfile; do cd "${pkg%/*}" eval "$( grep '^release=' 'Pkgfile' )" sed -i ' /^release=/ s@=.*$@='"$((release+1))"'@ ' 'Pkgfile' sudo -u pkgmk fakeroot pkgmk -if -is -f pkgmk -uf if git status --porcelain | grep -qF " cpan2cruxPorts/${pkg%/*}/.footprint"; then pkgmk -us -sk '/etc/ports/deepthought.sec' git add 'Pkgfile' '.footprint' '.signature' else git checkout 'Pkgfile' fi cd .. done if [ -n "$(git status --porcelain)" ]; then git commit -m'rebuild cpan2cruxPorts' fi