From bf40eb86fc9acfea0c5ca8cda1cf82f6f1d8fe25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 9 Oct 2020 20:51:11 +0300 Subject: [PATCH] strip-llvm: Simplify stripping out the executable suffix --- strip-llvm.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/strip-llvm.sh b/strip-llvm.sh index 5491746..5e86fbc 100755 --- a/strip-llvm.sh +++ b/strip-llvm.sh @@ -56,11 +56,7 @@ for i in bugpoint c-index-test clang-* diagtool dsymutil git-clang-format hmapto basename=$i if [ -n "$EXEEXT" ]; then # Some in the list are expanded globs, some are plain names we list. - case $i in - *$EXEEXT) - basename=$(echo $i | sed "s/$EXEEXT\$//") - ;; - esac + basename=${i%$EXEEXT} i=$basename if [ -e $basename$EXEEXT ]; then i=$basename$EXEEXT