aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2024-05-06 10:17:18 +0200
committerMattias Andrée <maandree@kth.se>2024-05-06 10:17:18 +0200
commit9e61d4b3a6c16ea7e914956a571849d14c0e0baf (patch)
tree404c2545e9618a224822ea7fcf3125762d866358 /Makefile
parent... (diff)
downloaddotfiles-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 '')
-rw-r--r--Makefile22
1 files changed, 13 insertions, 9 deletions
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