diff options
author | Mattias Andrée <maandree@kth.se> | 2024-05-06 10:17:18 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2024-05-06 10:17:18 +0200 |
commit | 9e61d4b3a6c16ea7e914956a571849d14c0e0baf (patch) | |
tree | 404c2545e9618a224822ea7fcf3125762d866358 /Makefile | |
parent | ... (diff) | |
download | dotfiles-9e61d4b3a6c16ea7e914956a571849d14c0e0baf.tar.gz dotfiles-9e61d4b3a6c16ea7e914956a571849d14c0e0baf.tar.bz2 dotfiles-9e61d4b3a6c16ea7e914956a571849d14c0e0baf.tar.xz |
Update clawsrc and make python and st exclusive to zenith
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -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 |