mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 00:02:03 +02:00
added check if revision.inc is writable
git-svn-id: trunk@8874 -
This commit is contained in:
parent
e5196c9d04
commit
e896e8026a
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<PathDelim Value="\"/>
|
||||
<PathDelim Value="/"/>
|
||||
<Version Value="5"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
@ -40,7 +40,6 @@
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="5"/>
|
||||
<PathDelim Value="\"/>
|
||||
<CodeGeneration>
|
||||
<SmartLinkUnit Value="True"/>
|
||||
<Generate Value="Faster"/>
|
||||
|
@ -167,11 +167,18 @@ begin
|
||||
Result := true;
|
||||
end;
|
||||
|
||||
function CanCreateRevisionInc: boolean;
|
||||
begin
|
||||
Result:=(not FileExists(RevisionIncFileName))
|
||||
or FileIsWritable(RevisionIncFileName);
|
||||
end;
|
||||
|
||||
begin
|
||||
if not ParamsValid then begin
|
||||
writeln('Usage: ',ExtractFileName(ParamStr(0)),' sourcedir revision.inc');
|
||||
halt(1);
|
||||
end;
|
||||
if not CanCreateRevisionInc then exit;
|
||||
if FindRevision or not IsValidRevisionInc then
|
||||
WriteRevisionInc;
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user