Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/locate/locate Quote $FILELIST and $BIGRAMS consisten...



details:   https://anonhg.NetBSD.org/src/rev/111955d68335
branches:  trunk
changeset: 526520:111955d68335
user:      kim <kim%NetBSD.org@localhost>
date:      Sun May 05 07:27:35 2002 +0000

description:
Quote $FILELIST and $BIGRAMS consistently.  Especially the latter
can elicit "usage" from locate.code at runtime.

diffstat:

 usr.bin/locate/locate/updatedb.sh |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (38 lines):

diff -r eae9c838dcc9 -r 111955d68335 usr.bin/locate/locate/updatedb.sh
--- a/usr.bin/locate/locate/updatedb.sh Sun May 05 06:07:42 2002 +0000
+++ b/usr.bin/locate/locate/updatedb.sh Sun May 05 07:27:35 2002 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $NetBSD: updatedb.sh,v 1.6 2001/11/07 15:31:41 lukem Exp $
+#      $NetBSD: updatedb.sh,v 1.7 2002/05/05 07:27:35 kim Exp $
 #
 # Copyright (c) 1989, 1993
 #      The Regents of the University of California.  All rights reserved.
@@ -46,8 +46,8 @@
 
 PATH="/bin:/usr/bin"
 FILELIST=`mktemp -t locate.list` || exit 1
-trap "rm -f $FILELIST" EXIT
-trap "rm -f $FILELIST; exit 1" INT QUIT TERM
+trap "rm -f '$FILELIST'" EXIT
+trap "rm -f '$FILELIST'; exit 1" INT QUIT TERM
 
 # Make a file list and compute common bigrams.
 # Entries of each directory shall be sorted (find -s).
@@ -63,12 +63,12 @@
     \) -a -prune -o -print \
        >> "$FILELIST"
 
-BIGRAMS="`$LIBDIR/locate.bigram <$FILELIST`"
+BIGRAMS=`$LIBDIR/locate.bigram <"$FILELIST"`
 
 # code the file list
 if [ -z "$BIGRAMS" ]; then
        echo 'locate: updatedb failed' >&2
 else
-       $LIBDIR/locate.code $BIGRAMS <"$FILELIST" >$FCODES
-       chmod 644 $FCODES
+       $LIBDIR/locate.code "$BIGRAMS" <"$FILELIST" >"$FCODES"
+       chmod 644 "$FCODES"
 fi



Home | Main Index | Thread Index | Old Index