I have scripts that preserve executable permissions within a tar, so it can
work. I am not sure what would be different in your setup, but something
like this seems to work for me. Typing from memory, so might be some
errors...

Philip

myfile = copySpec {
    from('component-interface-tests') {
        fileMode=0755
        include('test-support/**')
   }
   from('component-interface-tests') {
       include('integration-tests/**')
       include('README')
   }
}

task tar (type: Tar) {
    with myfiles
}



2011/10/11 Richard Miehe <richard.mi...@onair.aero>

>  I have a directory that has executable scripts that I need to archive
> up.  I was initially doing this as a jar, but jar's don't include any
> permissions.****
>
> ** **
>
> I switched to the following which does create a tar archive, but does not
> preserve the files' original permissions.****
>
> ** **
>
> task tar (type: Tar) {****
>
>   from fileTree('component-interface-tests')****
>
> }****
>
> ** **
>
> I see there is an open issue (http://issues.gradle.org/browse/GRADLE-673),
> but the workaround doesn't seem to work with milestone 3.****
>
> ** **
>
> Does anyone have an example of that I could bundle the following
> directories and files?  In my case, only the files in test-support directory
> need to have executable permission.****
>
> ** **
>
> component-interface-tests/****
>
> ├── README****
>
> ├── integration-tests****
>
> │   ├── component1****
>
> │       ├── 1.0.2****
>
> │           ├── S-61****
>
> │           │   └── 61.data****
>
> │           ├── S-64****
>
> │               ├── 64a.data****
>
> │               └── 64b.data****
>
> └── test-support****
>
>     ├── setup.sh****
>
>     ├── reset.sh****
>
>     └── whatever.sh****
>
> ** **
>
> Thanks,****
>
> Richard.****
>
> ** **
>
> Richard Miehe****
>
> Software Dev in Test****
>
> ** **
>
> OnAir****
>
> 2013 4th Avenue, Suite 400****
>
> Seattle, WA 98121 USA****
>
> www.onair.aero****
>
> ** **
>
> OnAir. Stay connected.****
>
> ** **
>
> [image: Plane_leaf]Please consider the environment - do you really need to
> print this email?****
>
> ** **
>
> ------------------------------
> Disclaimer: This e-mail (and any attachments to it) is confidential and
> intended solely for the named person/s to whom it is addressed. If you are
> not an intended recipient, please notify us immediately and delete the email
> from your system. Any review, dissemination or other use of it in these
> circumstances is prohibited.
>

<<image001.gif>>

Reply via email to