From 9a4bbd34b265ee92921d64cfe95386db744b3422 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 22 Sep 2014 09:38:06 -0600 Subject: [PATCH] Use magic extglob bash syntax instead of explicitly ignoring MAINTAINERS in our loop --- build.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/build.sh b/build.sh index 5663a00..e32d652 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,9 @@ #!/bin/bash set -e +# so we can have fancy stuff like !(pattern) +shopt -s extglob + dir="$(dirname "$(readlink -f "$BASH_SOURCE")")" library="$dir/../library" @@ -77,7 +80,7 @@ done repos=() if [ "$buildAll" ]; then - repos=( $(cd "$library" && echo *) ) + repos=( "$library"/!(MAINTAINERS) ) fi repos+=( "$@" ) @@ -103,10 +106,6 @@ mkdir -p "$latestLogDir" # gather all the `repo:tag` combos to build for repoTag in "${repos[@]}"; do - if [ "$repoTag" = 'MAINTAINERS' ]; then - continue - fi - echo "$repoTag" >> "$logDir/repos.txt" if [ "${repoGitRepo[$repoTag]}" ]; then