41 lines
1.4 KiB
Diff
41 lines
1.4 KiB
Diff
|
From 6208866dbef0b336e2b63695b27d61d95ace5721 Mon Sep 17 00:00:00 2001
|
||
|
Message-Id: <6208866dbef0b336e2b63695b27d61d95ace5721.1686643559.git.jstancek@redhat.com>
|
||
|
From: Jan Stancek <jstancek@redhat.com>
|
||
|
Date: Tue, 13 Jun 2023 09:26:08 +0200
|
||
|
Subject: [PATCH] copy-firmware.sh: don't add cmpxtn to directory links
|
||
|
Content-type: text/plain
|
||
|
|
||
|
Signed-off-by: Jan Stancek <jstancek@redhat.com>
|
||
|
---
|
||
|
copy-firmware.sh | 14 +++++++++++---
|
||
|
1 file changed, 11 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/copy-firmware.sh b/copy-firmware.sh
|
||
|
index fc419a340c48..acd095ac8952 100755
|
||
|
--- a/copy-firmware.sh
|
||
|
+++ b/copy-firmware.sh
|
||
|
@@ -77,9 +77,17 @@ grep -E '^Link:' WHENCE | sed -e's/^Link: *//g' -e's/-> //g' | while read f d; d
|
||
|
$verbose "WARNING: missing target for symlink $f$cmpxtn"
|
||
|
fi
|
||
|
else
|
||
|
- $verbose "creating link $f$cmpxtn -> $d$cmpxtn"
|
||
|
- install -d $destdir/$(dirname "$f$cmpxtn")
|
||
|
- ln -sf "$d$cmpxtn" "$destdir/$f$cmpxtn"
|
||
|
+ mkdir -p $(dirname "$f")
|
||
|
+ if test -d $(dirname "$f")/"$d"; then
|
||
|
+ # don't add compression extension to directory symlinks
|
||
|
+ $verbose "creating dir link $f -> $d"
|
||
|
+ install -d $destdir/$(dirname "$f")
|
||
|
+ ln -sf "$d" "$destdir/$f"
|
||
|
+ else
|
||
|
+ $verbose "creating link $f$cmpxtn -> $d$cmpxtn"
|
||
|
+ install -d $destdir/$(dirname "$f$cmpxtn")
|
||
|
+ ln -sf "$d$cmpxtn" "$destdir/$f$cmpxtn"
|
||
|
+ fi
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
--
|
||
|
2.31.1
|
||
|
|