locate.updatedb: Add -- to the invocation of locate.code

A bigram can start with a dash/minus, don't let getopt misinterpret it
as an option.

From Hakan Engvall in PR misc/57191
This commit is contained in:
uwe 2023-01-20 13:07:09 +00:00
parent 0ba9aba167
commit 362fd7a4d4
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $NetBSD: updatedb.sh,v 1.17 2020/04/25 10:06:42 simonb Exp $
# $NetBSD: updatedb.sh,v 1.18 2023/01/20 13:07:09 uwe Exp $
#
# Copyright (c) 1989, 1993
# The Regents of the University of California. All rights reserved.
@ -216,6 +216,6 @@ if [ -z "$BIGRAMS" ]; then
echo 'locate: updatedb failed' >&2
exit 1
else
$LIBDIR/locate.code "$BIGRAMS" <"$FILELIST" >"$FCODES"
$LIBDIR/locate.code -- "$BIGRAMS" <"$FILELIST" >"$FCODES"
chmod 644 "$FCODES"
fi