summaryrefslogtreecommitdiffhomepage
path: root/subr
diff options
context:
space:
mode:
Diffstat (limited to 'subr')
-rw-r--r--subr/pkg_install.subr3
1 files changed, 2 insertions, 1 deletions
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" <<EOF
Name: ${PKG_NAME}
Version: ${PKG_VERSION}