On Fri, 9 Oct 2015 17:48:08 +0200
Patrick Lauer <patr...@gentoo.org> wrote:

> 
> 
> On 10/09/15 17:42, Davide Pesavento wrote:
> > On Fri, Oct 9, 2015 at 5:35 PM, hasufell <hasuf...@gentoo.org> wrote:
> >> On 10/08/2015 11:04 PM, Richard Farina wrote:
> >>
> >> +all_ruby_prepare() {
> >> +     [ -f Gemfile.lock ] && rm Gemfile.lock
> >> missing "|| die" afais, should probably be
> >>
> >> [ -f Gemfile.lock ] && { rm Gemfile.lock || die ; }
> >>
> > Or simply:
> >
> > rm -f Gemfile.lock || die
> >
> With -f it always succeeds, so the ||die is redundant  ...
> 

$ touch foo1
$ sudo chattr +i foo1 
$ rm -f foo1 || echo FAIL
rm: cannot remove 'foo1': Operation not permitted
FAIL

-- 
Alexander Tsoy

Reply via email to