=================================================================== RCS file: /cvs/openbsd/fill_chroot/fill_chroot,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- openbsd/fill_chroot/fill_chroot 2008/09/17 21:08:17 1.13 +++ openbsd/fill_chroot/fill_chroot 2008/10/21 20:10:35 1.14 @@ -1,10 +1,10 @@ #!/bin/sh -# $RedRiver: fill_chroot,v 1.12 2008/09/16 22:38:35 andrew Exp $ +# $RedRiver: fill_chroot,v 1.13 2008/09/17 20:08:17 andrew Exp $ CHROOT=${CHROOT:=/home/andrew/www} export CHROOT -_find="-name '*.so.*' -o -name '*.so' -o ( -name perl -a -type f )" +_find="-name *.so.* -o -name *.so -o ( -name perl -a -type f )" install -d -m 1750 -o www -g bin ${CHROOT}/tmp for d in ${CHROOT}/{bin,sbin,usr,var,dev}/ \ @@ -54,13 +54,16 @@ fi echo Installing dependencies into ${CHROOT} -for d in `find ${CHROOT}/usr ${_find} | \ +find ${CHROOT}/usr ${_find} | xargs find_depends | \ - sort -u `; do - - echo pax -r -w -L -p e $d ${CHROOT} - pax -r -w -L -p e $d ${CHROOT} -done + sort -u | \ +{ + local _d + while read _d; do + echo pax -r -w -L -p e ${_d##${CHROOT}} ${CHROOT} + pax -r -w -L -p e ${_d##${CHROOT}} ${CHROOT} + done +} echo Fixing ldconfig \(/var/run/ld.so.hints\) fix_ldconfig