Changeset View
Changeset View
Standalone View
Standalone View
Mk/bsd.port.mk
Show First 20 Lines • Show All 4,327 Lines • ▼ Show 20 Lines | for dir in $$(${ALL-DEPENDS-LIST}); do \ | ||||
_p=$$(cd $$dir; ${MAKE} -VPKGNAME); \ | _p=$$(cd $$dir; ${MAKE} -VPKGNAME); \ | ||||
if ! $$(${ECHO_CMD} $${_packages} | ${GREP} -q $${_p}); then \ | if ! $$(${ECHO_CMD} $${_packages} | ${GREP} -q $${_p}); then \ | ||||
${ECHO_CMD} $${_p}; \ | ${ECHO_CMD} $${_p}; \ | ||||
fi; \ | fi; \ | ||||
done | done | ||||
# Install missing dependencies from package | # Install missing dependencies from package | ||||
install-missing-packages: | install-missing-packages: | ||||
@_dirs=$$(${MISSING-DEPENDS-LIST}); \ | @_dirs=$$(${MISSING-DEPENDS-LIST}); \ | ||||
if [ -n "$${_dirs}" ]; then \ | ${ECHO_CMD} "$${_dirs}" | ${SED} "s%${PORTSDIR}/%%g" | ${SU_CMD} "${XARGS} -o ${PKG_BIN} install -A" | ||||
mat: I would use `| ${XARGS}` which will take care of that. | |||||
Done Inline ActionsHmm, sure, although I think that tr is more explicit. 0mp: Hmm, sure, although I think that tr is more explicit. | |||||
Done Inline ActionsThis should be ${SU_CMD} "${ECHO_CMD} \"$${_dirs}\" | ${SED} 's%${PORTSDIR}/%%g' | ${XARGS} ${PKG_BIN} install -A" or even better push the su outwards as much as possible ${ECHO_CMD} "$${_dirs}" | ${SED} "s%${PORTSDIR}/%%g" | ${SU_CMD} "${XARGS} ${PKG_BIN} install -A" tobik: This should be
`${SU_CMD} "${ECHO_CMD} \"$${_dirs}\" | ${SED} 's%${PORTSDIR}/%%g' | ${XARGS}… | |||||
Done Inline ActionsWe've tried that approach, @tobik. The problem is that then you cannot have interactive prompts from pkg (stdin is taken by xargs). 0mp: We've tried that approach, @tobik.
The problem is that then you cannot have interactive… | |||||
Done Inline ActionsI see. Luckily there seems to be an xargs(1) flag for exactly that, -o: ${ECHO_CMD} "$${_dirs}" | ${SED} "s%${PORTSDIR}/%%g" | ${SU_CMD} "${XARGS} -o ${PKG_BIN} install -A" tobik: I see. Luckily there seems to be an xargs(1) flag for exactly that, `-o`:
```
${ECHO_CMD}… | |||||
Done Inline ActionsHa! I didn't know about this one! Thanks. 0mp: Ha! I didn't know about this one! Thanks. | |||||
${SU_CMD} "${PKG_BIN} install -A $$(${ECHO_CMD} "$${_dirs}" | ${SED} "s%${PORTSDIR}/%%g")"; \ | |||||
fi | |||||
################################################################ | ################################################################ | ||||
# Everything after here are internal targets and really | # Everything after here are internal targets and really | ||||
# shouldn't be touched by anybody but the release engineers. | # shouldn't be touched by anybody but the release engineers. | ||||
################################################################ | ################################################################ | ||||
# This target generates an index entry suitable for aggregation into | # This target generates an index entry suitable for aggregation into | ||||
# a large index. Format is: | # a large index. Format is: | ||||
▲ Show 20 Lines • Show All 1,058 Lines • Show Last 20 Lines |
I would use | ${XARGS} which will take care of that.