Blame SOURCES/50-copy-files

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