summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-01-23 15:58:46 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-01-23 15:58:46 +0900
commit233394bd9a179623be96ac0ee49f9f018b3e378b (patch)
tree48ea79455b0696048731d0da8b2c877c07b7ffd0 /Makefile
parentdc59b155d8ebe9d63994cffae824a2f57cb6516f (diff)
modified Makefile, modified bin/mw
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 29 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 27620f9..a0c2bf1 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,8 @@
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
-DEPENDENCIES = neomutt curl isync msmtp pass ca-certificates gettext
+DEPENDENCIES = neomutt curl msmtp pass gettext
+NON_EXEC_DEPS = isync ca-certificates
check-dependencies:
@for dep in $(DEPENDENCIES); do \
@@ -11,6 +12,33 @@ check-dependencies:
exit 1; \
fi; \
done
+ @for dep in $(NON_EXEC_DEPS); do \
+ if command -v pacman >/dev/null 2>&1; then \
+ if ! pacman -Q $$dep >/dev/null 2>&1; then \
+ echo "Error: $$dep is not installed."; \
+ exit 1; \
+ fi; \
+ elif command -v dpkg >/dev/null 2>&1; then \
+ if ! dpkg -s $$dep >/dev/null 2>&1; then \
+ echo "Error: $$dep is not installed."; \
+ exit 1; \
+ fi; \
+ elif command -v rpm >/dev/null 2>&1; then \
+ if ! rpm -q $$dep >/dev/null 2>&1; then \
+ echo "Error: $$dep is not installed."; \
+ exit 1; \
+ fi; \
+ elif command -v zypper >/dev/null 2>&1; then \
+ if ! zypper se -i $$dep >/dev/null 2>&1; then \
+ echo "Error: $$dep is not installed."; \
+ exit 1; \
+ fi; \
+ else \
+ echo "Error: Unsupported package manager. Cannot verify installation of $$dep."; \
+ exit 1; \
+ fi; \
+ done
+ @echo "All dependencies are installed."
install-dependencies:
@if command -v apt-get >/dev/null 2>&1; then \