From cc12569d673579f7610622e36a62e4a892246b0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Mon, 14 May 2018 14:37:17 +0000 Subject: subr/pkg_install.subr: only build RPM when rpmbuild(8) is available. --- subr/pkg_install.subr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'subr/pkg_install.subr') diff --git a/subr/pkg_install.subr b/subr/pkg_install.subr index 17b4d04b..c9273cbc 100644 --- a/subr/pkg_install.subr +++ b/subr/pkg_install.subr @@ -17,7 +17,8 @@ pkg_install() { tar -C "${PKG_DESTDIR}" -cpf - . |\ gzip -c -9 - > "${PKG_BASE_DIR}/${PKG_NAME}.tgz" fi; - if [ "${ARG_RPM:-0}" -eq 1 ]; then + if [ "${ARG_RPM:-0}" -eq 1 ]\ + && [ -x "$(which rpmbuild 2>/dev/null)" ]; then cat > "${PKG_BASE_DIR}/${PKG_NAME}.spec" <