utils: Reformat lines that are longer than 80 columns
[samba.git] / selftest / gdb_run
blob42d91b8559b780dcf3125884960f67e22d6e3d45
1 #!/bin/sh
3 ENV="$1"
5 shift 1
7 TMPFILE=`mktemp --tmpdir gdb_run.XXXXXXXXXX`
8 test -n "${TMPFILE}" || {
9 echo "mktemp doesn't work" 1>&2
10 exit 1
13 cat << EOF > $TMPFILE
14 run
16 EOF
18 trap "/bin/rm -f $TMPFILE" EXIT
19 CMD="gdb -x $TMPFILE --args $@"
20 echo $CMD
21 eval $ENV "$CMD"