support of termux in make
This commit is contained in:
parent
2e33a23edc
commit
0db00ae5d9
1 changed files with 19 additions and 3 deletions
18
Makefile
18
Makefile
|
@ -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
|
||||||
|
@ -13,6 +14,7 @@ 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
|
||||||
|
|
Loading…
Reference in a new issue