#!/bin/sh
# author : wrn (24-NOV-94)
# changes: .GNU to .gpi (13.2.2003)




if test x"$1" = x--help ; then
    echo AYUDA ngp
    exit 0
    fi

if test x"$1" = x--version ; then
    echo readsumma.sh version 3
    exit 0
    fi




 BASEDIR=/usr/local
 NGPEXE=${BASEDIR}/bin/ngp_gnu
 NGPRC=${BASEDIR}/etc/ngp.rc
echo
echo "N G P"
echo "ngp.rc: " $NGPRC
echo 
 if test -f $1.dirac
    then
    rm dirac.dat ngp.rc 2>/dev/null
    ln -s $1.dirac dirac.dat
    ln -s ${NGPRC} ngp.rc
    if  [ $2 ] ; then
       gdb -q  $NGPEXE
     else
       $NGPEXE
    fi
    rm dirac.dat 
    rm ngp.rc
    mv temp.gpi $1.gpi
 else
    echo 'Datei ' $1.dirac ' nicht vorhanden'
 fi
exit
