This is an automated email from the ASF dual-hosted git repository.
zrhoffman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new 214ebb08dc Fix Pkg to Only Add Weasel if Already Exists (#6977)
214ebb08dc is described below
commit 214ebb08dcff640b7ea6fb2083f437120cd2fde1
Author: Steve Hamrick <[email protected]>
AuthorDate: Thu Jul 21 09:14:26 2022 -0600
Fix Pkg to Only Add Weasel if Already Exists (#6977)
* Only add weasel if exists
* Simplify
---
pkg | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pkg b/pkg
index e7c2d4141e..a9efc2b4af 100755
--- a/pkg
+++ b/pkg
@@ -155,9 +155,10 @@ while getopts h78abdf:lopqvsSL opt; do
esac
done
+CMD=$("${COMPOSECMD[@]}" -f $COMPOSE_FILE config --services)
# Weasel must be built first otherwise it will fail from build artifacts/cache
in an environment that doesn't have git
# e.g. the environment produced by `./pkg source`.
-PROJECTS="weasel"$'\n'"$("${COMPOSECMD[@]}" -f $COMPOSE_FILE config --services
| sed '/^weasel$/d')"
+PROJECTS=$(grep -E "^weasel$" <<<"$CMD"; grep -Ev "^weasel$"<<<"$CMD")
HELP_TEXT="$(cat <<HELP_TEXT
Usage: $SELF [options] [projects]
-7 Build RPMs targeting CentOS 7