Blame SOURCES/50-copy-files

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