From 362fd7a4d40e8be22ab2d37bf992c617da04e00c Mon Sep 17 00:00:00 2001 From: uwe Date: Fri, 20 Jan 2023 13:07:09 +0000 Subject: [PATCH] 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 --- usr.bin/locate/locate/updatedb.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/locate/locate/updatedb.sh b/usr.bin/locate/locate/updatedb.sh index 7255613b7cca..cd9ea0936cb7 100644 --- a/usr.bin/locate/locate/updatedb.sh +++ b/usr.bin/locate/locate/updatedb.sh @@ -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