git: e7d6783f4a2c - main - enable to set locate command

From: Wolfram Schneider <wosch_at_FreeBSD.org>
Date: Sun, 30 Jan 2022 16:25:16 UTC
The branch main has been updated by wosch:

URL: https://cgit.FreeBSD.org/src/commit/?id=e7d6783f4a2cde71bc664b338d70ba0388a4ce2d

commit e7d6783f4a2cde71bc664b338d70ba0388a4ce2d
Author:     Wolfram Schneider <wosch@FreeBSD.org>
AuthorDate: 2022-01-30 16:24:49 +0000
Commit:     Wolfram Schneider <wosch@FreeBSD.org>
CommitDate: 2022-01-30 16:24:49 +0000

    enable to set locate command
---
 usr.bin/locate/locate/mklocatedb.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/usr.bin/locate/locate/mklocatedb.sh b/usr.bin/locate/locate/mklocatedb.sh
index fd4a1ff7f03b..2cbf0979c332 100644
--- a/usr.bin/locate/locate/mklocatedb.sh
+++ b/usr.bin/locate/locate/mklocatedb.sh
@@ -45,6 +45,7 @@ PATH=$LIBEXECDIR:/bin:/usr/bin:$PATH; export PATH
 # utilities to built locate database
 : ${bigram:=locate.bigram}
 : ${code:=locate.code}
+: ${locate:=locate}
 : ${sort:=sort}
 
 sort_opt="-u -T $TMPDIR -S 20%"
@@ -66,9 +67,9 @@ if [ X"$1" = "X-presort" ]; then
     # This scheme avoid large temporary files in /tmp
 
     $code $bigrams > $filelist
-    locate -d $filelist / | $bigram | $sort -nr | \
+    $locate -d $filelist / | $bigram | $sort -nr | \
       awk 'NR <= 128 && /^[ \t]*[1-9][0-9]*[ \t]+..$/ { printf("%s", substr($0, length($0)-1, 2)) }' > $bigrams
-    locate -d $filelist / | $code $bigrams
+    $locate -d $filelist / | $code $bigrams
 else
     $sort $sort_opt > $filelist
     $bigram < $filelist | $sort -nr | \