]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: change `sort|uniq` to `sort -u`
authorMike Frysinger <vapier@gentoo.org>
Wed, 4 Jan 2023 03:38:22 +0000 (22:38 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sat, 14 Jan 2023 00:06:31 +0000 (19:06 -0500)
These are equivalent, but more performant.  We already use `sort -u`
elsewhere in the codebase, so nothing new here really.

* t/add-missing.tap: Change `sort|uniq` to `sort -u`.
* t/CheckListOfTests.am: Likewise.

t/CheckListOfTests.am
t/add-missing.tap

index e17083a62d472b3cefcea097585c1e9d7639f7ba..672af700e88b51ef1d46968fdd4ef79d29c0716e 100644 (file)
@@ -49,7 +49,7 @@ maintainer-check-list-of-tests:
               ($(am__cd) $(srcdir) && ls $$dir/*$$ext 2>/dev/null); \
             fi; \
           done; \
-        done | sed 's,^\./,,' | sort | uniq >$(am__tfs); \
+        done | sed 's,^\./,,' | sort -u >$(am__tfs); \
 ## Compare the two lists, complain if they differ.
         if $$diff $(am__tmk) $(am__tfs) >$(am__tdf); then \
            result=0; \
index 010c03ec5864afd4e824835678a545d0d1cf23cb..ea42bc9cda05533e5877c4cb969c24afeffec196 100644 (file)
@@ -196,7 +196,7 @@ check_ ()
     # Only the expected files should be installed.  But automake always
     # require 'missing' and 'install-sh', so account for them.
     all_files="install-sh missing $files"
-    for f in $all_files; do echo $f; done | sort | uniq > files.exp
+    for f in $all_files; do echo $f; done | sort -u > files.exp
     (cd $build_aux && ls) | sort > files.got
     cat files.exp
     cat files.got