From: David Howells <dhowells(a)redhat.com>
The update_scripts.sh script doesn't correctly strip the suffix from the
end of the pathname, but will substitute for it anywhere in the path. The
pattern really ought to have been /[.]$TARGET$//.
Fix this by using a special shell expansion to do it instead of invoking a
sed pipeline.
Signed-off-by: David Howells <dhowells(a)redhat.com>
cc: Jeremy Cline <jcline(a)redhat.com>
---
redhat/update_scripts.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/redhat/update_scripts.sh b/redhat/update_scripts.sh
index bbfd6f11f058..5c3dbaeb9459 100755
--- a/redhat/update_scripts.sh
+++ b/redhat/update_scripts.sh
@@ -7,6 +7,6 @@ fi
TARGET=$1
for i in $RPM_SOURCE_DIR/*.$TARGET; do
- NEW=`echo $i | sed s/.$TARGET//`
+ NEW=${i%.$TARGET}
cp $i $NEW
done
--
2.26.2