[GRASS-dev] [bug #4498] (grass) d.out.png script copied to docs/html/ in err

Wolf Bergenheim wolf+grass at bergenheim.net
Wed May 24 11:00:43 EDT 2006


On Wed, 24 May 2006, Markus Neteler wrote:
>
> How to get
>
>        -for file in  *.png *.jpg ; do \
>                head -1 $$file | grep '#!/bin/sh' > /dev/null \
>                if [ $$? -ne 0 ] ; then
>                   $(INSTALL_DATA) $$file $(GISBASE)/docs/html \
>                fi \
>                done 2> /dev/null ; true
>
> working (in include/Make/Html.make)?
> The problem is that $$? isn't found. Maybe there is a less ugly trick to
> test if
> the first file of the $$file is a shell script.

I'm no expert but shouldn't
    -for file in  *.png *.jpg ; do \
         if [ ! -x $$file ] ; then \
            $(INSTALL_DATA) $$file $(GISBASE)/docs/html \
         fi \
         done 2> /dev/null ; true

do the trick since shellscript should be executable?

--W

-- 

<:3 )---- Wolf Bergenheim ----( 8:>




More information about the grass-dev mailing list