=================================================================== RCS file: /cvs/openbsd/fill_chroot/Attic/perl_to_chroot,v retrieving revision 1.2 retrieving revision 1.6 diff -u -r1.2 -r1.6 --- openbsd/fill_chroot/Attic/perl_to_chroot 2005/12/21 18:06:32 1.2 +++ openbsd/fill_chroot/Attic/perl_to_chroot 2008/09/13 00:07:59 1.6 @@ -1,23 +1,16 @@ #!/bin/sh -# $RedRiver: perl_to_chroot,v 1.1 2005/12/21 18:04:06 andrew Exp $ +# $RedRiver: perl_to_chroot,v 1.5 2006/06/29 18:44:19 andrew Exp $ -PERLLIBS=`ldd /usr/bin/perl | cut -d ' ' -f 7 | sed -e 's/:$//'` -CHROOT=${CHROOT:=/home/andrew/www} +PERLLIBS=`ldd /usr/bin/perl | cut -c 41- | grep ^/` +CHROOT=${CHROOT:=/var/www} -for f in ${PERLLIBS} /usr/libdata/perl5 /usr/local/libdata/perl5; do - DESTDIR=${CHROOT}`dirname ${f}` +for f in /usr/bin/perl \ + ${PERLLIBS} \ + /usr/libdata/perl5 \ + /usr/local/libdata/perl5 \ + ; do - if [ ! -d ${DESTDIR} ]; then - echo mkdir -p ${DESTDIR} - mkdir -p ${DESTDIR} - fi - - RECURSE= - if [ -d ${f} ]; then - RECURSE=-r - fi - - echo cp ${RECURSE} ${f} ${DESTDIR} - cp ${RECURSE} ${f} ${DESTDIR} + echo pax -r -w -L -p e ${f} ${CHROOT} + pax -r -w -L -p e ${f} ${CHROOT} done