| 1 |
#! /bin/sh -e |
| 2 |
# This file is part of Coccinelle, lincensed under the terms of the GPL v2. |
| 3 |
# See copyright.txt in the Coccinelle source code for more information. |
| 4 |
# The Coccinelle source code can be obtained at http://coccinelle.lip6.fr |
| 5 |
|
| 6 |
exec_prefix="@prefix@" |
| 7 |
LIBDIR="@libdir@"/coccinelle/spgen |
| 8 |
|
| 9 |
if [ -f "$LIBDIR"/spgen ] |
| 10 |
then |
| 11 |
TARGET=spgen |
| 12 |
elif [ -f "$LIBDIR"/spgen.opt ] |
| 13 |
then |
| 14 |
TARGET=spgen.opt |
| 15 |
else |
| 16 |
echo Unable to find spgen executable. >/dev/fd/2 |
| 17 |
exit 1 |
| 18 |
fi |
| 19 |
|
| 20 |
exec "$LIBDIR/$TARGET" "$@" |