Hi Nathan and Ken.
On Wed, 27 Mar 2013 02:32:14 -0400 (EDT)
Nathan Scott <nathans@xxxxxxxxxx> wrote:
> Hi Ken,
>
> ----- Original Message -----
> > The rpm spec files both contain
> >
> > mv -fun "$source" "$target"
> >
> > on SuSE, mv(1) has no -n option (nor the equivalent --no-clobber) ...
> > need some recoding here in old-style portable Unix command speak I
> > think
> > ... I'll leave that to someone who understands what this was supposed
> > to
> > be doing.
It looks like --no-clobber was added in 2009 with coreutils 7.1 - it's
present on SLE11SP2 but missing from SLE11SP1.
> > I'm guessing it needs to be
> >
> > [ -d "$target" ] || mv -fu "$source" "$target"
> >
> > if "$target" is always a directory in this context
> >
>
> Both source and target will be (should be!) files at that point in
> the script - I think changing the -d to -f in your suggestion above
> will do the trick.
Sounds fine to me.
> ddiss will no doubt appreciate your attentions here - he's been unwell
> recently btw, "descending mountain sickness" I believe. The perils of
> living with beautiful snow-covered mountains as your backdrop!
I'm back to full strength now, was just a normal flu :)
Cheers, David
|