* improved create_project_files.pl to automatically add the created qt-creator

project files to svn:ignore


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35107 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe 2010-01-16 22:21:39 +00:00
parent 66204ee8cf
commit 4052469d00

View File

@ -7,6 +7,8 @@ use strict;
This simple script traverses the haiku sources and creates (incomplete) *.pro
files in order to make the haiku sources available within the qt-creator IDE.
Additionally, it will add those files to svn:ignore of their parent directory
(unless already contained there).
=cut
@ -81,4 +83,24 @@ sub writeProFile
"SOURCES = ".join(" \\\n\t", sort @{$info->{sources}})."\n";
}
close $proFileFH;
updateSvnIgnore($proFile);
}
sub updateSvnIgnore
{
my $proFile = shift;
my ($filename, $parentDir) = fileparse($proFile);
my $svnIgnore = qx{svn propget --strict svn:ignore $parentDir};
if (!grep { $_ eq $filename } split "\n", $svnIgnore) {
chomp $svnIgnore;
$svnIgnore .= "\n" unless !$svnIgnore;
$svnIgnore .= "$filename\n";
open(my $propsetFH, "|svn propset svn:ignore --file - $parentDir")
or die "unable to open pipe to 'svn propset'";
print $propsetFH $svnIgnore;
close($propsetFH);
}
}