Blame SOURCES/50-copy-files

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