1.1 --- a/makesd-expand-def Sat May 25 18:20:40 2019 +0200
1.2 +++ b/makesd-expand-def Sat May 25 23:38:04 2019 +0200
1.3 @@ -6,8 +6,7 @@
1.4 PROGNAME=`basename "$0"`
1.5 THISDIR=`dirname "$0"`
1.6
1.7 -DEFSFILE="makesd-defs"
1.8 -DEFSPATH="$THISDIR/$DEFSFILE"
1.9 +DEFS="$THISDIR/makesd-defs"
1.10
1.11
1.12
1.13 @@ -30,7 +29,7 @@
1.14
1.15 Search for a definition of the given name in the definitions file:
1.16
1.17 -$DEFSPATH
1.18 +$DEFS
1.19
1.20 If the definition can be found, the value of the definition is emitted and an
1.21 exit value of 0 returned. Otherwise, no output is produced and an exit value of
1.22 @@ -53,13 +52,13 @@
1.23
1.24 # Obtain the line number of the matching definition.
1.25
1.26 - LINENUM=`grep -h -n "^$1\s" "$DEFSPATH" | cut -d: -f1`
1.27 + LINENUM=`grep -h -n "^$1\s" "$DEFS" | cut -d: -f1`
1.28
1.29 if [ "$LINENUM" ] ; then
1.30
1.31 # Read from the definition line. Line continuations are observed.
1.32
1.33 - tail -n "+$LINENUM" "$DEFSPATH" | if read LINE ; then
1.34 + tail -n "+$LINENUM" "$DEFS" | if read LINE ; then
1.35 echo "$LINE"
1.36 break
1.37 fi