From 2914f017cf0cd4891ce2dd139c39c0b681affc59 Mon Sep 17 00:00:00 2001 From: zimoch Date: Thu, 6 Oct 2016 13:26:53 +0000 Subject: [PATCH] -I option added --- externalLinks | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/externalLinks b/externalLinks index be2314c..2130ee0 100755 --- a/externalLinks +++ b/externalLinks @@ -4,8 +4,8 @@ version () { echo '$Author: zimoch $' >&2 - echo '$Date: 2016/10/06 12:56:53 $' >&2 - echo '$Revision: 1.20 $' >&2 + echo '$Date: 2016/10/06 13:26:53 $' >&2 + echo '$Revision: 1.21 $' >&2 echo '$Source: /cvs/G/EPICS/App/scripts/externalLinks,v $' >&2 exit 1 } @@ -23,6 +23,7 @@ usage () { echo " -r | -require show required modules" >&2 echo " -o | -overwrite don't warn about overwriting fields" >&2 echo " -f | -find record find links to record" >&2 + echo " -I find templates in dir" >&2 echo " -3.13 use lastest EPICS 3.13 version (default for SLS)" >&2 echo " -3.14 use lastest EPICS 3.14 version (default for SwissFEL, HIPA)" >&2 echo " -3.x.x use specific EPICS version" >&2 @@ -56,6 +57,9 @@ do ( -w | ?(-)-where ) WHERE=1 ;; ( -o | ?(-)-overwrite ) OVERWRITE=1 ;; ( -f | ?(-)-find ) FIND+=" $2"; shift ;; + ( -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##*-} ;; @@ -155,6 +159,7 @@ function expandFile () { module=$(basename $modulebase) debug module: $module > /dev/stderr moduledir=$(ls -1rvd $modulebase/*.*.*/R${EPICS} | head -n 1) + [ $moduledir = "." ] && continue debug moduledir: $moduledir > /dev/stderr for dbd in $moduledir/dbd/*.dbd do