Merge pull request #335 from konstruktoid/issue330

sed option extravaganza #330
This commit is contained in:
Thomas Sjögren 2018-10-25 08:48:07 +02:00 committed by GitHub
commit 9dd2fa5ce0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -121,8 +121,8 @@ main () {
if [ -z "$check" ] && [ ! "$checkexclude" ]; then
cis
elif [ -z "$check" ] && [ "$checkexclude" ]; then
checkexcluded="$(echo "$checkexclude" | sed 's/,/|/g')"
for c in $(grep 'check_[0-9]_' functions_lib.sh | grep -vE "$checkexcluded"); do
checkexcluded="$(echo ",$checkexclude" | sed -e 's/^/\^/g' -e 's/,/\$|/g' -e 's/$/\$/g')"
for c in $(grep 'check_[0-9]_' functions_lib.sh | grep -vE "\'$checkexcluded\'"); do
"$c"
done
else