-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (59 loc) · 2.23 KB
/
Makefile
File metadata and controls
68 lines (59 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# version 0.0.1
# created by : Team ViewTech
# date : 2025-06-05 | 08.47 WIB
# developer : Xenzi & Polygon (pejuang kentang)
########################################
# Daftar package
PACKAGEBASH := curl python bc ncurses-utils file ossp-uuid uuid-utils less zsh boxes figlet ruby clang tree jq ripgrep coreutils xz-utils fzf gum silversearcher-ag file brotli mpv pv neofetch binutils html2text openssl-tool bzip2
PACKAGEPY := xonsh requests rich rich-cli emoji pycryptodome
TERMUX_PATH := /data/data/com.termux/files/usr/bin/bash
PYTHON_VERSION := $(shell python -V | sed 's/[[:space:]]//g' | cut -c 1-10 | tr '[:upper:]' '[:lower:]')
# =======================[ CEK ]=======================
detectCLI:
@echo "[?] Mengecek lingkungan termux..."
@if [ -f "$(TERMUX_PATH)" ]; then \
echo "[✓] Termux terdeteksi!"; \
else \
echo "[!] Path Termux tidak ditemukan!"; \
echo "[!] Mohon gunakan Termux untuk menjalankan skrip ini."; \
exit 1; \
fi
# =======================[ INSTALL PACKAGE BASH ]======================
install-system: detectCLI
@echo "[?] Menginstall package dari bash..."
@for pkg in $(PACKAGEBASH); do \
echo "[>] Menginstall $$pkg..."; \
apt-get install $$pkg -y >/dev/null 2>&1; \
if test -z "$$(command -v $$pkg >/dev/null 2>&1)"; then \
echo "[✓] Berhasil menginstall $$pkg"; \
else \
echo "[✗] Gagal menginstall $$pkg"; \
echo "[!] Jalankan manual: pkg install $$pkg"; \
fi; \
done
# =======================[ INSTALL PACKAGE PYTHON ]=====================
install-py: detectCLI
@if command -v python >/dev/null 2>&1; then \
echo "[✓] Python ditemukan"; \
echo "[>] Menginstall Python package: $(PACKAGEPY)..."; \
for install in $(PACKAGEPY); do \
pip install $$install; \
done \
else \
echo "[✗] Python tidak ditemukan! Silakan install terlebih dahulu."; \
fi
@echo "[!] Jalankan perintah: xonsh setup.xsh";
update: detectCLI
@echo "[>] Melakukan update ..";sleep 1
@git pull
install: install-system install-py
fix:
pip uninstall urllib3 -y
pip install urllib3==1.26.16
pip install six
rm -rf $$PREFIX/lib/$(PYTHON_VERSION)/site-packages/requests
pip uninstall requests -y
pip uninstall psutil -y
pip install requests
all: install
.PHONY: detectCLI install-system install-py