Yeah, we can use uname[1]. I try my best to avoid OS detection only because
there are many out there. This issue stems from how .exe files are handled in
Cygwin. Basically they treat 'file.exe' and 'file' to be the same thing as
'file' is an executable in *nix[2].
Judging by how the rsync command uses --ignore-existing (skip updating files
that already exist on receiver), then would it be right to assume that cp is to
behave the same way? Basically only copy over files if they don't already
exist in the target sdk folder. I'm basing my assuming on yes only because that
is what will happen if we copy over a directory, existing files will not be
overwritten and skipped. If we do intend to skip existing files then we just
need to add the -n flag to the cp command at line 68 (inside
copyFileOrDirectory). After that we will not attempt to copy adl if adl.exe
already exists in the target sdk folder.
Chris
[1] http://en.wikipedia.org/wiki/Uname
[2]
http://cygwin.1069669.n5.nabble.com/cp-utility-bug-when-dest-name-exe-file-exist-tp57955p58001.html
> From: e...@ixsoftware.nl
> Date: Tue, 16 Dec 2014 19:00:40 +0100
> Subject: Re: git commit: [flex-sdk] [refs/heads/release4.14.0] - add adl and
> act to list of files to copy
> To: dev@flex.apache.org
>
> Do you have any idea how we may special case the copy of these files,
> so they are excluded when the script runs on Cygwin?
>
> EdB
>
>
>
> On Tue, Dec 16, 2014 at 6:46 PM, Chris Martin <chrsm...@outlook.com> wrote:
> > Hey everyone,
> >
> > The original shell file ran fine on Cygwin.
> >
> > Chris
> >
> >> From: e...@ixsoftware.nl
> >> Date: Tue, 16 Dec 2014 17:05:35 +0100
> >> Subject: Re: git commit: [flex-sdk] [refs/heads/release4.14.0] - add adl
> >> and act to list of files to copy
> >> To: dev@flex.apache.org
> >>
> >> > Also wanted to make sure it was noted that the bat file also does not
> >> > copy the adt and adl files as I think we are expecting. Are we
> >> > expecting those files to also be copied if they use the bat file?
> >>
> >> No, I think we aren't expecting that. *.bat only runs on Windows, so
> >> only needs to copy the adt.exe and adl.exe. the *.sh can run on Mac
> >> AND Windows (Cygwin), so it needs to copy both the exe and the other
> >> files, which Justin added...
> >>
> >> If the original file ran well on Cygwin, and the new file runs into
> >> problems, I think we need to revert the lines Justin added and try to
> >> figure out a way to make those two copy commands conditional to the
> >> platform (i.e. not run on Cygwin).
> >>
> >> EdB
> >>
> >>
> >>
> >> --
> >> Ix Multimedia Software
> >>
> >> Jan Luykenstraat 27
> >> 3521 VB Utrecht
> >>
> >> T. 06-51952295
> >> I. www.ixsoftware.nl
> >
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl