find links to records option added
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
|
||||
version () {
|
||||
echo '$Author: zimoch $' >&2
|
||||
echo '$Date: 2016/02/19 12:31:47 $' >&2
|
||||
echo '$Revision: 1.17 $' >&2
|
||||
echo '$Date: 2016/04/21 12:01:53 $' >&2
|
||||
echo '$Revision: 1.18 $' >&2
|
||||
echo '$Source: /cvs/G/EPICS/App/scripts/externalLinks,v $' >&2
|
||||
exit 1
|
||||
}
|
||||
@@ -22,6 +22,7 @@ usage () {
|
||||
echo " -w | -where show record.link and target" >&2
|
||||
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 " -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
|
||||
@@ -50,6 +51,7 @@ do
|
||||
( -r | ?(-)-require ) REQUIRE=1 ;;
|
||||
( -w | ?(-)-where ) WHERE=1 ;;
|
||||
( -o | ?(-)-overwrite ) OVERWRITE=1 ;;
|
||||
( -f | ?(-)-find ) FIND+=" $2"; shift ;;
|
||||
( ?(-)-3.13 ) EPICS=3.13.10 ;;
|
||||
( ?(-)-3.14 ) EPICS=3.14.12 ;;
|
||||
( ?(-)-3.* ) EPICS=${1##*-} ;;
|
||||
@@ -158,10 +160,11 @@ function expandFile () {
|
||||
echo "# file $subs"
|
||||
dbLoadTemplate -L -- $subs
|
||||
done
|
||||
} | awk -v where=$WHERE -v require=$REQUIRE -v debug=$DEBUG -v epics=$EPICS -v overwrite=$OVERWRITE '
|
||||
} | awk -v where=$WHERE -v require=$REQUIRE -v debug=$DEBUG -v epics=$EPICS -v overwrite=$OVERWRITE -v findrecords="$FIND" '
|
||||
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 ++}
|
||||
/# file / {
|
||||
@@ -494,6 +497,9 @@ function expandFile () {
|
||||
record = a[1]
|
||||
field = a[2]
|
||||
if (alias[record] != "") { record = alias[record] }
|
||||
for (r in find) {
|
||||
if (record ~ find[r]) {print reference[target] " -> " target}
|
||||
}
|
||||
if (recordtype[record] == "") {
|
||||
if (where) print reference[target] " -> " target
|
||||
else print target
|
||||
|
||||
Reference in New Issue
Block a user