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