From kde-commits Sat Sep 03 07:40:40 2011 From: Oswald Buddenhagen Date: Sat, 03 Sep 2011 07:40:40 +0000 To: kde-commits Subject: Re: icecream Message-Id: <20110903074040.GA5037 () ugly ! local> X-MARC-Message: https://marc.info/?l=kde-commits&m=131503565727675 On Sat, Sep 03, 2011 at 03:44:49AM +0200, Michael Matz wrote: > On Fri, 2 Sep 2011, Oswald Buddenhagen wrote: > > /usr/lib/gcc/i486-linux-gnu/4.6/cc1 > > /usr/lib/gcc/i486-linux-gnu/4.6/collect2 > > /usr/lib/gcc/i486-linux-gnu/4.6/crtbegin.o > > /usr/lib/gcc/i486-linux-gnu/4.6/liblto_plugin.so.0.0.0 > > > > ossi@ugly:~ > gcc --print-prog-name liblto_plugin.so > > liblto_plugin.so > > Ugh. So the liblto_plugin.so softlink isn't in > /usr/lib/gcc/i486-linux-gnu/4.6/ for you (though the .so.0.0 is)? > no, that's actually consistent. the list above was only meant to contain "one of each sort", not necessarily correlating with the queries below. but of course it's the more confusing that the file is not found with the "right" query command even though it is clearly there. > > anyway, given that debian (and ubuntu) are a rather massive reality, i'd > > suggest to make the script try both. > > Yeah. Try both and use the one for which test -f succeeds I think. > Try --print-prog-name first. > oke. fwiw, i think a better test is test -z "${path##/*}" this just checks whether it starts with a slash, which should be sufficient.