Browse Source

Add a property that allows a failed chmod to be non-fatal.

<chmod> can fail if the user running the build is not the owner of the
file who's permissions should be changed.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270998 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 23 years ago
parent
commit
cc68eb8bbf
1 changed files with 15 additions and 9 deletions
  1. +15
    -9
      build.xml

+ 15
- 9
build.xml View File

@@ -21,6 +21,7 @@
<property name="version" value="1.5alpha"/> <property name="version" value="1.5alpha"/>


<property name="debug" value="true" /> <property name="debug" value="true" />
<property name="chmod.fail" value="true" />
<property name="deprecation" value="false" /> <property name="deprecation" value="false" />
<property name="optimize" value="true" /> <property name="optimize" value="true" />
<property name="junit.fork" value="false" /> <property name="junit.fork" value="false" />
@@ -406,9 +407,11 @@
</fixcrlf> </fixcrlf>
<fixcrlf srcdir="${dist.bin}" includes="*.pl" /> <fixcrlf srcdir="${dist.bin}" includes="*.pl" />


<chmod perm="ugo+rx" dir="${dist.dir}" type="dir" includes="**" />
<chmod perm="ugo+r" dir="${dist.dir}" type="file" includes="**" />
<chmod perm="ugo+x" type="file">
<chmod perm="ugo+rx" dir="${dist.dir}" type="dir" includes="**"
failonerror="${chmod.fail}" />
<chmod perm="ugo+r" dir="${dist.dir}" type="file" includes="**"
failonerror="${chmod.fail}" />
<chmod perm="ugo+x" type="file" failonerror="${chmod.fail}">
<fileset dir="${dist.bin}"> <fileset dir="${dist.bin}">
<include name="**/ant" /> <include name="**/ant" />
<include name="**/antRun" /> <include name="**/antRun" />
@@ -473,9 +476,11 @@
</fileset> </fileset>
</copy> </copy>


<chmod perm="ugo+rx" dir="${dist.dir}" type="dir" includes="**" />
<chmod perm="ugo+r" dir="${dist.dir}" type="file" includes="**" />
<chmod perm="ugo+x" type="file">
<chmod perm="ugo+rx" dir="${dist.dir}" type="dir" includes="**"
failonerror="${chmod.fail}" />
<chmod perm="ugo+r" dir="${dist.dir}" type="file" includes="**"
failonerror="${chmod.fail}" />
<chmod perm="ugo+x" type="file" failonerror="${chmod.fail}">
<fileset dir="${dist.bin}"> <fileset dir="${dist.bin}">
<include name="**/ant" /> <include name="**/ant" />
<include name="**/antRun" /> <include name="**/antRun" />
@@ -566,9 +571,10 @@
<include name="**/*.java" /> <include name="**/*.java" />
</fixcrlf> </fixcrlf>


<chmod perm="ugo+x" dir="${src.dist.dir}" type="dir"/>
<chmod perm="ugo+r" dir="${src.dist.dir}" />
<chmod perm="ugo+x">
<chmod perm="ugo+x" dir="${src.dist.dir}" type="dir"
failonerror="${chmod.fail}" />
<chmod perm="ugo+r" dir="${src.dist.dir}" failonerror="${chmod.fail}" />
<chmod perm="ugo+x" failonerror="${chmod.fail}">
<fileset dir="${src.dist.dir}"> <fileset dir="${src.dist.dir}">
<include name="**/.sh" /> <include name="**/.sh" />
<include name="**/ant" /> <include name="**/ant" />


Loading…
Cancel
Save