[OS-BUILD PATCH] Fix update_scripts.sh unselective pattern sub

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
cc: Jeremy Cline <jcline@xxxxxxxxxx>
---
 update_scripts.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/update_scripts.sh b/update_scripts.sh
index bbfd6f11f..5c3dbaeb9 100755
--- a/update_scripts.sh
+++ b/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
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux