#!/bin/sh u="Look for a file named DIR.gdb-test-flags, and if it is present, generate appropriate arguments for a 'make check' command to pass its contents to runtest. For example, if DIR.gdb-test-flags contains the text: --target_board=m32r-elf break.exp then gdb-test-flags DIR would produce the output: RUNTESTFLAGS='--target_board=m32r-elf break.exp'" set -eu eval "$(args gdb-test-flags dir -u "$u" -- "$@")" [ -f $dir.gdb-test-flags ] && echo "RUNTESTFLAGS='$(cat $dir.gdb-test-flags)'"