#!/bin/sh # this script expects the pgCC command (or a wrapper to pgCC, e.g. mpiCC) # and returns the version of pgCC and the optional wrapper PATHEXE=`which $1` PGCCEXE=`$1 -dryrun 2>&1 | grep "\/\.pg" | head -1 | awk '{ print $3} '` PGCCEXE=$PGCCEXE"TermX" PGCCEXE=`echo $PGCCEXE | sed 's/\.pg.*TermX/pgCC/g'` if [ $PGCCEXE = $PATHEXE ]; then $PGCCEXE -V else $1 -v -c $PGCCEXE -V fi