From 77f31a8000b197d0c26d3a7eeb591bee1a9eb3c2 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Mon, 5 Jun 2023 14:58:09 +0100 Subject: [PATCH] copy-firmware: tweak sed invocation Add space between the arguments and pattern and combine patterns where possible. Signed-off-by: Emil Velikov Signed-off-by: Josh Boyer --- copy-firmware.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/copy-firmware.sh b/copy-firmware.sh index e8098271..efbc3cb6 100755 --- a/copy-firmware.sh +++ b/copy-firmware.sh @@ -31,14 +31,14 @@ while test $# -gt 0; do esac done -grep '^File:' WHENCE | sed -e's/^File: *//g' -e's/"//g' | while read f; do +grep '^File:' WHENCE | sed -e 's/^File: *//g;s/"//g' | while read f; do test -f "$f" || continue $verbose "copying file $f" install -d "$destdir/$(dirname "$f")" cp -d "$f" "$destdir/$f" done -grep -E '^Link:' WHENCE | sed -e's/^Link: *//g' -e's/-> //g' | while read f d; do +grep -E '^Link:' WHENCE | sed -e 's/^Link: *//g;s/-> //g' | while read f d; do if test -L "$f"; then test -f "$destdir/$f" && continue $verbose "copying link $f"