Allow more EPICS versions and do better guessing on short numbers like 3.14 or 7

This commit is contained in:
zimoch
2018-07-05 15:37:55 +00:00
parent b8e979f099
commit f8fbda1fc5
+14 -7
View File
@@ -4,8 +4,8 @@
version () {
echo '$Author: zimoch $' >&2
echo '$Date: 2018/07/05 15:09:08 $' >&2
echo '$Revision: 1.22 $' >&2
echo '$Date: 2018/07/05 15:37:55 $' >&2
echo '$Revision: 1.23 $' >&2
echo '$Source: /cvs/G/EPICS/App/scripts/externalLinks,v $' >&2
exit 1
}
@@ -60,11 +60,17 @@ do
( -f* ) FIND+=" ${1#-f}" ;;
( -I ) INCLUDES+=" -I $2"; shift ;;
( -I* ) INCLUDES+=" -I ${1#-I}" ;;
( ?(-)-3.13 ) EPICS=3.13.10 ;;
( ?(-)-3.14 ) EPICS=3.14.12 ;;
( ?(-)-3.* ) EPICS=${1##*-} ;;
( ?(-)-[1-9]* )
VERSIONS=$(ls -1dvr /usr/local/epics/base$1*([.0-9]) | head -1)
EPICS=${VERSIONS##*-}
if [ "$EPICS" = "." ]
then
echo "No EPICS version ${1##*-} found" >&2
exit 1;
fi
;;
( -- | - ) shift; break ;;
( -* ) echo "unknown option $1 ignored" >&2 ;;
( -* ) echo "Unknown option $1 ignored" >&2 ;;
( * ) break ;;
esac
shift
@@ -75,6 +81,8 @@ then
usage
fi
echo "Info: Using EPICS version $EPICS" >&2
function expandFile () {
if [ ! -r $1 ]
then
@@ -189,7 +197,6 @@ function expandFile () {
-v epicsmodules=${EPICS_MODULES:=/ioc/modules} \
' BEGIN {
epics3_14ver=gensub(/^3\.14\./,"",1,epics)+0
printf ("Info: Using EPICS version %s (see -? how to change)\n", epics) > "/dev/stderr"
split(findrecords, find, " ");
}
{line ++}