Blame SOURCES/50-copy-files

0663da
function installFile() {
0663da
	if [ -d $1 ]
0663da
	then	source='--directory'
0663da
		msg="Dir. $2"
0663da
	else 	source=$1
0663da
		msg="File $2"
0663da
	fi
0663da
	owner=$(stat --format %u $1)
0663da
	group=$(stat --format %g $1)
0663da
	perms=$(stat --format %a $1)
0663da
	install \
0663da
		--mode  $perms \
0663da
		--owner $owner \
0663da
		--group $group \
0663da
		$source $2 && echo $msg
0663da
}
0663da
0663da
find register.content -mindepth 2 -print | while read source
0663da
do
0663da
  dest=${source/register.content/}
0663da
  installFile $source $dest
0663da
done
0663da