Blame SOURCES/50-copy-files

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