From 9206039086b841fa5ac8fcca301d63ac691f5339 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 25 Jun 2021 20:34:07 +0200 Subject: Fix bugs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- claws-mail/Makefile | 2 +- filesystem/Makefile | 4 ++-- libcontacts/Makefile | 6 +++++- openssh/Makefile | 9 ++++++--- texinfo/Makefile | 7 +++++-- 5 files changed, 19 insertions(+), 9 deletions(-) diff --git a/claws-mail/Makefile b/claws-mail/Makefile index 45df08c..be61de5 100644 --- a/claws-mail/Makefile +++ b/claws-mail/Makefile @@ -18,7 +18,7 @@ install: fi; \ ln -sf -- .var/mail ~/Mail; \ fi - test -e ~/.hidden && grep '^Mail$$' < ~/.hidden || printf '%s\n' "Mail" >> ~/.hidden + test -e ~/.hidden && grep '^Mail$$' < ~/.hidden > /dev/null || printf '%s\n' "Mail" >> ~/.hidden uninstall: -unlink -- ~/.claws-mail/clawsrc diff --git a/filesystem/Makefile b/filesystem/Makefile index a074dc3..1fb2bff 100644 --- a/filesystem/Makefile +++ b/filesystem/Makefile @@ -69,10 +69,10 @@ install: mkdir -p -- ~/.usr/src ln -sf -- ~/.dotfiles/filesystem/user-dirs.dirs ~/.config/ set -e && for f in $(HIDE); do \ - test -e ~/.hidden && grep '^'"$$f"'$$' < ~/.hidden || printf '%s\n' "$$f" >> ~/.hidden; \ + test -e ~/.hidden && grep '^'"$$f"'$$' < ~/.hidden > /dev/null || printf '%s\n' "$$f" >> ~/.hidden; \ done if test "$$(hostname | tr '[[:upper:]]' '[[:lower:]]')" = zenith; then \ - test -e ~/.hidden && grep '^cryptokey.gpg$$' < ~/.hidden || printf '%s\n' "cryptokey.gpg" >> ~/.hidden; \ + test -e ~/.hidden && grep '^cryptokey.gpg$$' < ~/.hidden > /dev/null || printf '%s\n' "cryptokey.gpg" >> ~/.hidden; \ fi uninstall: diff --git a/libcontacts/Makefile b/libcontacts/Makefile index 1f246e3..262f283 100644 --- a/libcontacts/Makefile +++ b/libcontacts/Makefile @@ -12,6 +12,10 @@ install: fi uninstall: - -unlink -- ~/.config/contacts + -if ! $(CHECK_INSTALLED) libcontacts 2>/dev/null && \ + ! $(CHECK_INSTALLED) libcontacts-glibc 2>/dev/null && \ + ! $(CHECK_INSTALLED) libcontacts-musl 2>/dev/null; then \ + unlink -- ~/.config/contacts; \ + fi .PHONY: install uninstall diff --git a/openssh/Makefile b/openssh/Makefile index a05d8ad..6ee7512 100644 --- a/openssh/Makefile +++ b/openssh/Makefile @@ -14,8 +14,11 @@ install: ln -sf -- ~/.dotfiles/openssh/bash-aliases ~/.config/bash/aliases.d/openssh uninstall: - -unlink -- ~/.ssh - -unlink -- ~/.config/bash/aliases.d/openssh - -rmdir -- ~/.config/bash/aliases.d + -if ! $(CHECK_INSTALLED) ssh 2>/dev/null && \ + ! $(CHECK_INSTALLED) openssh 2>/dev/null; then \ + unlink -- ~/.ssh; \ + unlink -- ~/.config/bash/aliases.d/openssh; \ + rmdir -- ~/.config/bash/aliases.d; \ + fi .PHONY: install uninstall diff --git a/texinfo/Makefile b/texinfo/Makefile index 4bd8ed1..beaa9d7 100644 --- a/texinfo/Makefile +++ b/texinfo/Makefile @@ -11,7 +11,10 @@ install: fi uninstall: - -unlink -- ~/.config/bash/aliases.d/texinfo - -rmdir -- ~/.config/bash/aliases.d + -if ! $(CHECK_INSTALLED) info 2>/dev/null && \ + ! $(CHECK_INSTALLED) texinfo 2>/dev/null; then \ + unlink -- ~/.config/bash/aliases.d/texinfo; \ + rmdir -- ~/.config/bash/aliases.d; \ + fi .PHONY: install uninstall -- cgit v1.2.3-70-g09d2