diff --git a/Makefile b/Makefile index d084a90..7218b64 100644 --- a/Makefile +++ b/Makefile @@ -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