aboutsummaryrefslogblamecommitdiffstats
path: root/Makefile
blob: f543b597847f20e9813036b0babc4fcdd3293ddf (plain) (tree)
1
2
3

       
       












                                                                                                                        
                                     


                             





                                                                                    
.POSIX:

update:
	+@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; \
			fi; \
		fi; \
	done
	+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