Add more canonical "manifest line parsing" based on bashbrew scripts

This commit is contained in:
Tianon Gravi 2014-09-22 17:52:39 -06:00
parent a5a4647f3c
commit 87c5aaf3d9
1 changed files with 2 additions and 2 deletions

View File

@ -16,8 +16,8 @@ repoDirs=()
declare -A repoDirTags=()
for line in "${lines[@]}"; do
tag="${line%%: *}"
repoDir="${line#*: }"
tag="$(echo "$line" | awk -F ': +' '{ print $1 }')"
repoDir="$(echo "$line" | awk -F ': +' '{ print $2 }')"
if [ -z "${repoDirTags[$repoDir]}" ]; then
repoDirs+=( "$repoDir" )
else