Blame SOURCES/50-copy-files

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