From ca34d991ad527fec5edde186bb8479982ac52c03 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 7 Jun 2024 11:53:01 +0200 Subject: Minor fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 29 +++++++++++++++++++++++++++-- alsa-utils/Makefile | 2 +- base/xinit | 1 + man/Makefile | 2 +- mate-settings-daemon/Makefile | 17 +++++++++++++++++ ssh/Makefile | 2 +- xorg-xsetroot/xinit | 1 + 7 files changed, 49 insertions(+), 5 deletions(-) create mode 100644 mate-settings-daemon/Makefile diff --git a/Makefile b/Makefile index f543b59..3dc2d09 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,15 @@ .POSIX: -update: +update: update-common update-private update-work + +update-common: +@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 \ + if ! ./check-installed "$$(readlink -- "$${PKGDIR}")" 2>/dev/null; then \ printf -- '\033[1mcd %s && %s install\033[m\n' "$${PKGDIR}" '$(MAKE)'; \ (cd -- "$${PKGDIR}" && $(MAKE) install); \ fi; \ @@ -18,9 +20,32 @@ update: fi; \ fi; \ done + +update-private: +if test -f .private/pkgs/Makefile || test -f .private/pkgs/makefile; then \ cd -- .private/pkgs && $(MAKE); \ fi + +update-work: +if test -f .work/pkgs/Makefile || test -f .work/pkgs/makefile; then \ cd -- .work/pkgs && $(MAKE); \ fi + +.DEFAULT: + +@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 -- "$${PKGDIR}")" 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 diff --git a/alsa-utils/Makefile b/alsa-utils/Makefile index 13cc906..2a86985 100644 --- a/alsa-utils/Makefile +++ b/alsa-utils/Makefile @@ -13,7 +13,7 @@ install: mkdir -p -- ~/.config/X11/xinit/xinitrc.d test ! -e ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-alsa-util || \ test -L ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-alsa-util - ln -sf -- ~/.dotfiles/alsa-util/xinit ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-alsa-util + ln -sf -- ~/.dotfiles/alsa-utils/xinit ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-alsa-util uninstall: +! ../check-installed alsa-utils diff --git a/base/xinit b/base/xinit index 2ef7ed0..8630a3b 100644 --- a/base/xinit +++ b/base/xinit @@ -2,6 +2,7 @@ # Set keyboard settings setkeys || : +(sleep 2; setkeys || :) & # Start hotkey daemon xkbdbind & diff --git a/man/Makefile b/man/Makefile index 726047c..6fe759b 100644 --- a/man/Makefile +++ b/man/Makefile @@ -3,7 +3,7 @@ install: ../check-installed-shebang colourised-less-for-man ../check-installed-shebang man - ../check-in-path dmenu + -../check-in-path dmenu ../check-in-path sed ../check-in-path isfg ../check-in-path less diff --git a/mate-settings-daemon/Makefile b/mate-settings-daemon/Makefile new file mode 100644 index 0000000..6a335d8 --- /dev/null +++ b/mate-settings-daemon/Makefile @@ -0,0 +1,17 @@ +.POSIX: + +install: + test ! -e ~/.local/bin/mate-settings-daemon || test -L ~/.local/bin/mate-settings-daemon + if test -f /usr/libexec/mate-settings-daemon; then \ + ln -sf /usr/libexec/mate-settings-daemon ~/.local/bin/mate-settings-daemon; \ + elif test -f /usr/lib/mate-settings-daemon/mate-settings-daemon; then \ + ln -sf /usr/lib/mate-settings-daemon/mate-settings-daemon ~/.local/bin/mate-settings-daemon; \ + elif test -f /usr/lib/mate-settings-daemon; then \ + ln -sf /usr/lib/mate-settings-daemon ~/.local/bin/mate-settings-daemon; \ + else \ + rm -f -- ~/.local/bin/mate-settings-daemon 2>/dev/null; \ + fi + +uninstall: + +! ../check-installed mate-settings-daemon + -unlink -- ~/.local/bin/mate-settings-daemon diff --git a/ssh/Makefile b/ssh/Makefile index e7bf102..be4b0d5 100644 --- a/ssh/Makefile +++ b/ssh/Makefile @@ -3,7 +3,7 @@ DYNAMIC_ADDRESSES != \ for f in ../.secrets/ssh/hostfetch/* ../.work/ssh/hostfetch/* hostfetch/*; do \ test ! -x "$$f" || printf '%s\n' "$$f"; \ - done | sort -u | sed 's|^.*/\([^/]*[^/~]\)$$|\1|' + done | sort -u | sed -n 's|^.*/\([^/]*[^/~]\)$$|\1|p' install: -rm -f -- .ssh-config diff --git a/xorg-xsetroot/xinit b/xorg-xsetroot/xinit index 27f06b1..c172260 100644 --- a/xorg-xsetroot/xinit +++ b/xorg-xsetroot/xinit @@ -2,3 +2,4 @@ # Set cursor to right handed pointer xsetroot -cursor_name left_ptr +(sleep 2; xsetroot -cursor_name left_ptr) & -- cgit v1.2.3-70-g09d2