#!/usr/local/bin/bash
# Written by Wim Stockman on 18 Nov 2024
# uses bash and rsync on OpenBSD7.5

CHROOT='/var/www/'

for i in $( ldd $* | awk 'NR > 2{print $7;}' | sort | uniq )
  do
    echo $i
    rsync -a --relative $i $CHROOT
  done

echo "Chroot files are copied is ready."


