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