diff mbox series

[PULL,03/20] scripts/clean-includes: Skip symbolic links

Message ID 20230207064523.3968603-4-armbru@redhat.com (mailing list archive)
State New, archived
Headers show
Series [PULL,01/20] scripts/clean-includes: Fully skip / ignore files | expand

Commit Message

Markus Armbruster Feb. 7, 2023, 6:45 a.m. UTC
When a symbolic link points to a file that needs cleaning, the script
replaces the link with a cleaned regular file.  Not wanted; skip them.

We have a few symbolic links under subprojects/libvduse/ and
subprojects/libvhost-user/.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20230202133830.2152150-4-armbru@redhat.com>
---
 scripts/clean-includes | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/scripts/clean-includes b/scripts/clean-includes
index 8e8420d785..f0466a6262 100755
--- a/scripts/clean-includes
+++ b/scripts/clean-includes
@@ -113,6 +113,10 @@  EOT
 
 files=
 for f in "$@"; do
+  if [ -L "$f" ]; then
+      echo "SKIPPING $f (symbolic link)"
+      continue
+  fi
   case "$f" in
     *.c.inc)
       # These aren't standalone C source files