]> git.eshelyaron.com Git - emacs.git/commitdiff
; Simplify admin/run-codespell
authorStefan Kangas <stefankangas@gmail.com>
Sat, 11 Jan 2025 06:09:23 +0000 (07:09 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 12 Jan 2025 10:58:59 +0000 (11:58 +0100)
* admin/run-codespell (emacs_run_codespell): Simplify.  Use env in
shebang to use more recent bash on macOS.

(cherry picked from commit ce43d13593a44ba36ba6702cf276fef8711ab738)

admin/run-codespell

index be90313da1e6c3f4cea3ab860df0f733d6b4612e..f5728f831f09cb0d4bfcb1dc078ea4089ac50665 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 ### run-codespell - run codespell on Emacs
 
 ## Copyright (C) 2023-2025 Free Software Foundation, Inc.
@@ -40,22 +40,22 @@ CODESPELL_DICTIONARY="${CODESPELL_DIR}/codespell.dictionary"
 emacs_run_codespell ()
 {
     git ls-files |\
-        grep -v -E -e '^(lib|m4)/.*' |\
-        grep -v -E -e '^admin/(charsets|codespell|unidata)/.*' |\
-        grep -v -E -e '^doc/lispref/spellfile$' |\
-        grep -v -E -e '^doc/misc/texinfo.tex$' |\
-        grep -v -E -e '^doc/translations/.*' |\
-        grep -v -E -e '^etc/(AUTHORS|HELLO|publicsuffix.txt)$' |\
-        grep -v -E -e '^etc/refcards/(cs|de|fr|pl|pt|sk)-.+.tex$' |\
-        grep -v -E -e '^etc/tutorials/TUTORIAL\..+' |\
-        grep -v -E -e '^leim/(MISC|SKK)-DIC/.*' |\
-        grep -v -E -e '^lisp/language/ethio-util.el' |\
-        grep -v -E -e '^lisp/ldefs-boot.el' |\
-        grep -v -E -e '^lisp/leim/.*' |\
-        grep -v -E -e '^test/lisp/erc/resources/.*' |\
-        grep -v -E -e '^test/lisp/net/puny-resources/IdnaTestV2.txt' |\
-        grep -v -E -e '^test/manual/(etags|indent)/.*' |\
-        grep -v -E -e '^test/src/regex-resources/.*' |\
+        grep --line-buffered -v -E -e "^(lib|m4)/.*|\
+^admin/(charsets|codespell|unidata)/.*|\
+^doc/lispref/spellfile$|\
+^doc/misc/texinfo.tex$|\
+^doc/translations/.*|\
+^etc/(AUTHORS|HELLO|publicsuffix.txt)$|\
+^etc/refcards/(cs|de|fr|pl|pt|sk)-.+.tex$|\
+^etc/tutorials/TUTORIAL\..+|\
+^leim/(MISC|SKK)-DIC/.*|\
+^lisp/language/ethio-util.el|\
+^lisp/ldefs-boot.el|\
+^lisp/leim/.*|\
+^test/lisp/erc/resources/.*|\
+^test/lisp/net/puny-resources/IdnaTestV2.txt|\
+^test/manual/(etags|indent)/.*|\
+^test/src/regex-resources/.*" |\
         xargs codespell \
               --config "$CODESPELL_RC" \
               --exclude-file "$CODESPELL_EXCLUDE" \