view build-aux/find-files-with-tests.sh @ 17504:326af26556ea

surfl.m: Overhaul function. * scripts/plot/surfl.m: Improve docstring. Don't use mixed case variable names. Use in-place operators for performance.
author Rik <rik@octave.org>
date Wed, 25 Sep 2013 13:31:43 -0700
parents 43e6415393ff
children
line wrap: on
line source

#! /bin/sh

set -e
GREP=${GREP:-grep}
SED=${SED:-sed}

srcdir="$1"
shift

for arg
do
  if [ -f "$arg" ]; then
    file="$arg"
  else
    file="$srcdir/$arg"
  fi
  if [ "`$GREP -l '^%!' $file`" ]; then
    echo "$file" | $SED "s,\\$srcdir/,,";
  fi
done