From nobody Sun Jan 30 16:25:16 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E40DE197A308; Sun, 30 Jan 2022 16:25:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JmxPS64HJz4lCL; Sun, 30 Jan 2022 16:25:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643559916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VvVfswe5IINvwytict4DMm88R6JJEW4meyFFMupVbBY=; b=ICYc03VUTD5GOh85YvTHkz5vneDc35m+Wl7i60x2AmK+SDnfdb++tt9nIxA24cbIspNZaG 1JmGS2t562zjCc8WuHI0r8C8WflXEOotYjFPFa6ysCcc5H7Y4by9OTd6EMJdCZPigL3QRY oVe84t7JpPvkL0V0+rSbZsGiNScpOK/e4jn4+S7ozC6XWFlB0aE1KBBYHCbRh75vw1G7g9 GUjetTs6eBW6T+zp2ITj2lgjS/6SheCaMSPMm3a+Pc4gsei9GOnUpy9zLAU6yuTzxIay62 0ZyOIHsbmIPMgcCzbbORHUMkRGnPMpX/l/t93JTa6ZoxDkpIOioHNu1aXNtKMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ACB613CDC; Sun, 30 Jan 2022 16:25:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20UGPG1w081673; Sun, 30 Jan 2022 16:25:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20UGPGk2081672; Sun, 30 Jan 2022 16:25:16 GMT (envelope-from git) Date: Sun, 30 Jan 2022 16:25:16 GMT Message-Id: <202201301625.20UGPGk2081672@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wolfram Schneider Subject: git: e7d6783f4a2c - main - enable to set locate command List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e7d6783f4a2cde71bc664b338d70ba0388a4ce2d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643559916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VvVfswe5IINvwytict4DMm88R6JJEW4meyFFMupVbBY=; b=Z3GdcsHkbnEz0B+1ZFPNLQTRVgq0SIdZ1tOkU96rnA8DAlbN09y/7umBn0TFthnKsoNr2p AWvD8wwCe9VF6Cibu7qawG+PK9+3JEjqqfdXqdJDkQ41JTq+lQMxbxI2XiKnxDgApLchOt Blp8wBh5kEjdUB1Kugwv67ErT4UMcnVWm2B067u6eCFbqGQx466VuhAHsOTFfGBc+IUJak C/yzgHFTIZ2c736G/Qqe8obfykp/FpljgbtgmJTpHIxLB7TlLH3aHvooGpekSUBgOnjP1r wjA5zTbcIXlqGgXJuuF3pKg5sD0kKT6q7MTDuuWw3g2kuGJ9HRkUeWtqC6hPrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643559916; a=rsa-sha256; cv=none; b=cEvMVUgAfnYXwLGNLH87zb0dtkwI3cC/BDpQf615noSeNOTCEYyw07Tzhxv4oYQMjjWckZ XWp/M6Jsl01L1tsPao+VpcxnIWjzJnPGiMx9EQR/JkMtCn4j0xz2lW1iSuT39YFsGLeurN WCf9I/727+2zWuk2v6dWF2+OpHVPeE5NJDmt1or2wZBAOkQwBh4DTtaS5c1cxvvjqQMizZ IHh4tKvg4x15gurbtuKFBs+ozxdx3zXtFH662dqg45gYYlbGr1Zz0X8kGzT62vmr4Ewawq FZtpBHZtrmeZty/JlVJhZonFPl0o5/c+XUmv4HkkDQalv6Mmd97kEMPsYM4JGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=e7d6783f4a2cde71bc664b338d70ba0388a4ce2d commit e7d6783f4a2cde71bc664b338d70ba0388a4ce2d Author: Wolfram Schneider AuthorDate: 2022-01-30 16:24:49 +0000 Commit: Wolfram Schneider 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 | \