Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/poudriere.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBryan Drewery <bryan@shatow.net>2022-05-28 17:37:48 +0300
committerBryan Drewery <bryan@shatow.net>2022-05-28 17:37:48 +0300
commit4bebcc5be8617c5fa51b28de46dbbf8eb96eb360 (patch)
tree494879fd5e1853d443dc36d1e1b162a4b83d3b61 /src
parent8170f398de45251a62fd7b662f294ce9c4a289c9 (diff)
append_make: Display computed path rather than real
Diffstat (limited to 'src')
-rwxr-xr-xsrc/share/poudriere/common.sh16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/share/poudriere/common.sh b/src/share/poudriere/common.sh
index 27286c70..a26e9aac 100755
--- a/src/share/poudriere/common.sh
+++ b/src/share/poudriere/common.sh
@@ -8319,8 +8319,9 @@ balance_pool() {
append_make() {
[ $# -eq 3 ] || eargs append_make srcdir src_makeconf dst_makeconf
local srcdir="$1"
- local src_makeconf=$2
- local dst_makeconf=$3
+ local src_makeconf="$2"
+ local dst_makeconf="$3"
+ local src_makeconf_real
if [ "${src_makeconf}" = "-" ]; then
src_makeconf="${srcdir}/make.conf"
@@ -8329,13 +8330,18 @@ append_make() {
fi
[ -f "${src_makeconf}" ] || return 0
- src_makeconf="$(realpath ${src_makeconf} 2>/dev/null)"
+ src_makeconf_real="$(realpath ${src_makeconf} 2>/dev/null)"
# Only append if not already done (-z -p or -j match)
- if grep -q "# ${src_makeconf} #" ${dst_makeconf}; then
+ if grep -q "# ${src_makeconf_real} #" ${dst_makeconf}; then
return 0
fi
msg "Appending to make.conf: ${src_makeconf}"
- echo "#### ${src_makeconf} ####" >> ${dst_makeconf}
+ echo -n "#### ${src_makeconf_eal} ####" >> "${dst_makeconf}"
+ if [ "${src_makeconf_real}" != "${src_makeconf}" ]; then
+ echo " ${src_makeconf}"
+ else
+ echo
+ fi >> "${dst_makeconf}"
cat "${src_makeconf}" >> ${dst_makeconf}
}