diff options
Diffstat (limited to '')
-rw-r--r-- | Makefile | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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 |