Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Don't use exists() with dynamic variables
Philippe Pepiot committed 14 years ago
commit e1b1ddd155ae78b5dcff712240d0e7e480740987
parent dc7ed92
1 file changed +30 -30
modified ports/bsd.pkgng.mk
@@ -53,37 +53,37 @@ fake-pkg:
	@${ECHO_CMD} "conflict: ${conflicts}" >> ${MANIFESTF}
.endfor
.endif
-
.if exists(${PKGINSTALL})
-
	@${CP} ${PKGINSTALL} ${METADIR}/+INSTALL
-
.endif
-
.if exists(${PKGPREINSTALL})
-
	@${CP} ${PKGPREINSTALL} ${METADIR}/+PRE_INSTALL
-
.endif
-
.if exists(${PKGPOSTINSTALL})
-
	@${CP} ${PKGPOSTINSTALL} ${METADIR}/+POST_INSTALL
-
.endif
-
.if exists(${PKGDEINSTALL})
-
	@${CP} ${PKGDEINSTALL} ${METADIR}/+DEINSTALL
-
.endif
-
.if exists(${PKGPREDEINSTALL})
-
	@${CP} ${PKGPREDEINSTALL} ${METADIR}/+PRE_DEINSTALL
-
.endif
-
.if exists(${PKGPOSTDEINSTALL})
-
	@${CP} ${PKGPOSTDEINSTALL} ${METADIR}/+POST_DEINSTALL
-
.endif
-
.if exists(${PKGUPGRADE})
-
	@${CP} ${PKGUPGRADE} ${METADIR}/+UPGRADE
-
.endif
-
.if exists(${PKGPREUPGRADE})
-
	@${CP} ${PKGPREUPGRADE} ${METADIR}/+PRE_UPGRADE
-
.endif
-
.if exists(${PKGPOSTUPGRADE})
-
	@${CP} ${PKGPOSTUPGRADE} ${METADIR}/+POST_UPGRADE
-
.endif
+
	@if [ -f ${PKGINSTALL} ]; then \
+
		${CP} ${PKGINSTALL} ${METADIR}/+INSTALL; \
+
	fi
+
	@if [ -f ${PKGPREINSTALL} ]; then \
+
		${CP} ${PKGPREINSTALL} ${METADIR}/+PRE_INSTALL; \
+
	fi
+
	@if [ -f ${PKGPOSTINSTALL} ]; then \
+
		${CP} ${PKGPOSTINSTALL} ${METADIR}/+POST_INSTALL; \
+
	fi
+
	@if [ -f ${PKGDEINSTALL} ]; then \
+
		${CP} ${PKGDEINSTALL} ${METADIR}/+DEINSTALL; \
+
	fi
+
	@if [ -f ${PKGPREDEINSTALL} ]; then \
+
		${CP} ${PKGPREDEINSTALL} ${METADIR}/+PRE_DEINSTALL; \
+
	fi
+
	@if [ -f ${PKGPOSTDEINSTALL} ]; then \
+
		${CP} ${PKGPOSTDEINSTALL} ${METADIR}/+POST_DEINSTALL; \
+
	fi
+
	@if [ -f ${PKGUPGRADE} ]; then \
+
		${CP} ${PKGUPGRADE} ${METADIR}/+UPGRADE; \
+
	fi
+
	@if [ -f ${PKGPREUPGRADE} ]; then \
+
		${CP} ${PKGPREUPGRADE} ${METADIR}/+PRE_UPGRADE; \
+
	fi
+
	@if [ -f ${PKGPOSTUPGRADE} ]; then \
+
		${CP} ${PKGPOSTUPGRADE} ${METADIR}/+POST_UPGRADE; \
+
	fi
	@${CP} ${DESCR} ${METADIR}/+DESC
-
.if exists(${PKGMESSAGE})
-
	@${CP} ${PKGMESSAGE} ${METADIR}/+DISPLAY
-
.endif
+
	@if [ -f ${PKGMESSAGE} ]; then \
+
		${CP} ${PKGMESSAGE} ${METADIR}/+DISPLAY; \
+
	fi
.if !defined(NO_MTREE)
	@${CP} ${MTREE_FILE} ${METADIR}/+MTREE_DIRS
.endif