Use magic extglob bash syntax instead of explicitly ignoring MAINTAINERS in our loop

This commit is contained in:
Tianon Gravi 2014-09-22 09:38:06 -06:00
parent 2f9fd1c571
commit 9a4bbd34b2
1 changed files with 4 additions and 5 deletions

View File

@ -1,6 +1,9 @@
#!/bin/bash #!/bin/bash
set -e set -e
# so we can have fancy stuff like !(pattern)
shopt -s extglob
dir="$(dirname "$(readlink -f "$BASH_SOURCE")")" dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
library="$dir/../library" library="$dir/../library"
@ -77,7 +80,7 @@ done
repos=() repos=()
if [ "$buildAll" ]; then if [ "$buildAll" ]; then
repos=( $(cd "$library" && echo *) ) repos=( "$library"/!(MAINTAINERS) )
fi fi
repos+=( "$@" ) repos+=( "$@" )
@ -103,10 +106,6 @@ mkdir -p "$latestLogDir"
# gather all the `repo:tag` combos to build # gather all the `repo:tag` combos to build
for repoTag in "${repos[@]}"; do for repoTag in "${repos[@]}"; do
if [ "$repoTag" = 'MAINTAINERS' ]; then
continue
fi
echo "$repoTag" >> "$logDir/repos.txt" echo "$repoTag" >> "$logDir/repos.txt"
if [ "${repoGitRepo[$repoTag]}" ]; then if [ "${repoGitRepo[$repoTag]}" ]; then