From 9e61d4b3a6c16ea7e914956a571849d14c0e0baf Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 6 May 2024 10:17:18 +0200 Subject: Update clawsrc and make python and st exclusive to zenith MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 1c80c03..f543b59 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,20 @@ .POSIX: update: - +@for PKG in *; do \ - if test -d "$${PKG}"; then \ - if ./check-installed "$${PKG}" 2>/dev/null; then \ - if ! ./check-installed "$$(readlink -- "$${PKG}")" 2>/dev/null; then \ - printf -- '\033[1mcd %s && %s install\033[m\n' "$${PKG}" '$(MAKE)'; \ - (cd -- "$${PKG}" && $(MAKE) install); \ + +@for PKGDIR in *; do \ + if test -d "$${PKGDIR}"; then \ + PKG="$$(printf '%s@\n' "$${PKGDIR}" | cut -d @ -f 1)"; \ + HOST="$$(printf '%s@\n' "$${PKGDIR}" | cut -d @ -f 2 | tr A-Z a-z)"; \ + if test -z "$${HOST}" || test "$${HOST}" = "$$(hostname | tr A-Z a-z)"; then \ + if ./check-installed "$${PKG}" 2>/dev/null; then \ + if ! ./check-installed "$$(readlink -- "$${PKG}")" 2>/dev/null; then \ + printf -- '\033[1mcd %s && %s install\033[m\n' "$${PKGDIR}" '$(MAKE)'; \ + (cd -- "$${PKGDIR}" && $(MAKE) install); \ + fi; \ + else\ + printf -- '\033[1mcd %s && %s uninstall\033[m\n' "$${PKGDIR}" '$(MAKE)'; \ + (cd -- "$${PKGDIR}" && $(MAKE) uninstall || :); \ fi; \ - else\ - printf -- '\033[1mcd %s && %s uninstall\033[m\n' "$${PKG}" '$(MAKE)'; \ - (cd -- "$${PKG}" && $(MAKE) uninstall || :); \ fi; \ fi; \ done -- cgit v1.2.3-70-g09d2