freebsd-ports/Tools/portbuild/scripts/keeprestr
Kris Kennaway 6b9fc3cfd1 This script preserves packages that will be removed by the restricted.sh
script, i.e. so they can be moved back into place before start the next
incremental build so they won't be needlessly rebuilt every time (jdk, I'm
looking at you).  It is a bit of a hack since it relies on assumptions
about the structure of that shell script, but for now it's the best we
can do.
2006-04-03 04:40:10 +00:00

11 lines
301 B
Bash
Executable file

#!/bin/sh
arch=$1
branch=$2
cd /var/portbuild/${arch}/${branch}
rm -rf bak/restricted
mkdir -p bak/restricted
tar cvf - `tr ';' '\n' < restricted.sh | grep "/bin/rm -f" | awk '{print $3}' | grep packages/ | sed -e "s,/var/portbuild/${arch}/${branch}/,," -e 's,)$,,' ` | tar xfCP - bak/restricted/