support of termux in make

This commit is contained in:
Mylloon 2024-04-03 08:40:48 +02:00
parent 2e33a23edc
commit 0db00ae5d9
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -4,6 +4,7 @@ VC = git
# Util
RM = rm -f
MKDIR = mkdir -p
SED = sed -i
# Downloaders
REPO_SRC = https://git.mylloon.fr/Anri/confOS/raw/branch/main
@ -11,8 +12,9 @@ WGET = wget -q --show-progress
CURL = curl -s
# Checkers
ARCH = $(shell grep -c "archlinux" /proc/version)
WSL = $(shell grep -c "WSL2" /proc/version)
ARCH = $(shell grep -c "archlinux" /proc/version)
WSL = $(shell grep -c "WSL2" /proc/version)
TERMUX = $(shell type termux-info &> /dev/null)
# Hide some verbose messages from Make
MAKEFLAGS += --no-print-directory
@ -224,9 +226,16 @@ sync-windows:
# @echo
# Termux distro specific
sync-termux:
@$(SED) "/topgrade/d" $(HOME)/.config/fish/conf.d/abbr.fish
@echo "Fix-for-Termux applied!"
@echo
sync:
# Check if at least the platform is supported
ifneq (1, $(filter 1, $(ARCH) $(WSL)))
ifneq (1, $(filter 1, $(ARCH) $(WSL) $(TERMUX)))
@echo "❌ Unsupported platform"
else
@ -263,6 +272,13 @@ else ifeq ($(WSL), 1)
@echo "✅ Windows synced!"
@echo
# Specific to Termux
else ifeq ($(TERMUX), 1)
@$(MAKE) sync-termux
@echo "✅ Termux synced!"
@echo
endif
# END