aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-11-18 23:23:40 +0100
committerMattias Andrée <maandree@kth.se>2023-11-18 23:23:40 +0100
commit0f1df0db903ba576fd17b08197d3066af7a61e5f (patch)
treea59c04307b1382257afa3c3512ec3abadf7e0e47 /Makefile
parentUse losetup -d instead of --detach and add clean up (diff)
downloaddotfiles-0f1df0db903ba576fd17b08197d3066af7a61e5f.tar.gz
dotfiles-0f1df0db903ba576fd17b08197d3066af7a61e5f.tar.bz2
dotfiles-0f1df0db903ba576fd17b08197d3066af7a61e5f.tar.xz
A lot of changes
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 14 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index d8e10bb..1c80c03 100644
--- a/Makefile
+++ b/Makefile
@@ -1,18 +1,22 @@
.POSIX:
-CHECK_INSTALLED = pacman -Qq -- </dev/null >/dev/null
-
update:
- @for PKG in *; do \
+ +@for PKG in *; do \
if test -d "$${PKG}"; then \
- if $(CHECK_INSTALLED) $${PKG} 2>/dev/null ; then \
- printf -- '\033[1mmake -C %s install\033[m\n' "$${PKG}"; \
- make -C "$${PKG}" CHECK_INSTALLED="$(CHECK_INSTALLED)" install; \
+ 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); \
+ fi; \
else\
- printf -- '\033[1mmake -C %s uninstall\033[m\n' "$${PKG}"; \
- make -C "$${PKG}" CHECK_INSTALLED="$(CHECK_INSTALLED)" uninstall; \
+ printf -- '\033[1mcd %s && %s uninstall\033[m\n' "$${PKG}" '$(MAKE)'; \
+ (cd -- "$${PKG}" && $(MAKE) uninstall || :); \
fi; \
fi; \
done
-
-.PHONY: update
+ +if test -f .private/pkgs/Makefile || test -f .private/pkgs/makefile; then \
+ cd -- .private/pkgs && $(MAKE); \
+ fi
+ +if test -f .work/pkgs/Makefile || test -f .work/pkgs/makefile; then \
+ cd -- .work/pkgs && $(MAKE); \
+ fi