public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/setup] update_services: uidgidlint: make the script shellcheck-clean
Date: Mon, 22 Jun 2026 15:56:30 GMT	[thread overview]
Message-ID: <178214379078.1.17186833915728011527.rpms-setup-b760dd5ee7dd@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/setup
            Branch : update_services
            Commit : b760dd5ee7dd8721541d178784ed77a8209a2d2d
            Author : Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
            Date   : 2025-03-15T16:00:50+01:00
            Stats  : +9/-9 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/setup/c/b760dd5ee7dd8721541d178784ed77a8209a2d2d?branch=update_services

            Log:
            uidgidlint: make the script shellcheck-clean

[skip changelog]

---
diff --git a/uidgidlint b/uidgidlint
index c45beb3..997cc43 100755
--- a/uidgidlint
+++ b/uidgidlint
@@ -4,23 +4,23 @@ set -o pipefail
 
 # We need a file to look at.
 if [ -z "$*" ] ; then
-	echo Usage: `basename $0` uidgid
+	echo "Usage: $0 uidgid"
 	exit 1
 fi
 error=0
 # The format of the file is (currently)
 for infile in "$@" ; do
-	uidlist=`grep -v '^#' "$infile" | awk '{print $2}' | grep -v -e - | sort -nu`
-	gidlist=`grep -v '^#' "$infile" | awk '{print $3}' | grep -v -e - | sort -nu`
-	for uid in $uidlist ; do
-		if test `grep -v '^#' "$infile" | awk '{print $2}' | grep '^'"$uid"'$' | wc -l` -ne 1 ; then
-			echo Duplicate UID: $uid
+	uidlist=$(grep -v '^#' "$infile" | awk '{print $2}' | grep -v -e - | sort -nu)
+	gidlist=$(grep -v '^#' "$infile" | awk '{print $3}' | grep -v -e - | sort -nu)
+	for uid in $uidlist; do
+		if test "$(grep -v '^#' "$infile" | awk '{print $2}' | grep -c '^'"$uid"'$')" -ne 1 ; then
+			echo "Duplicate UID: $uid"
 			error=1
 		fi
 	done
-	for gid in $gidlist ; do
-		if test `grep -v '^#' "$infile" | awk '{print $3}' | grep '^'"$gid"'$' | wc -l` -ne 1 ; then
-			echo Duplicate GID: $gid
+	for gid in $gidlist; do
+		if test "$(grep -v '^#' "$infile" | awk '{print $3}' | grep -c '^'"$gid"'$')" -ne 1 ; then
+			echo "Duplicate GID: $gid"
 			error=1
 		fi
 	done

                 reply	other threads:[~2026-06-22 15:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178214379078.1.17186833915728011527.rpms-setup-b760dd5ee7dd@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox