view build-aux/find-files-with-tests.sh @ 20648:27c091f4b66d

allow first argument in ode45 to be a string * scripts/ode/ode45.m: allow first argument to be a string
author Carlo de Falco <carlo.defalco@polimi.it>
date Mon, 12 Oct 2015 23:28:29 +0200
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