aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 36ff3a8..d8e10bb 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,16 @@
+.POSIX:
+
+CHECK_INSTALLED = pacman -Qq -- </dev/null >/dev/null
+
update:
@for PKG in *; do \
if test -d "$${PKG}"; then \
- if pacman -Qq -- $${PKG} </dev/null >/dev/null 2>/dev/null ; then \
+ if $(CHECK_INSTALLED) $${PKG} 2>/dev/null ; then \
printf -- '\033[1mmake -C %s install\033[m\n' "$${PKG}"; \
- make -C "$${PKG}" install; \
+ make -C "$${PKG}" CHECK_INSTALLED="$(CHECK_INSTALLED)" install; \
else\
printf -- '\033[1mmake -C %s uninstall\033[m\n' "$${PKG}"; \
- make -C "$${PKG}" uninstall; \
+ make -C "$${PKG}" CHECK_INSTALLED="$(CHECK_INSTALLED)" uninstall; \
fi; \
fi; \
done