-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathMakefile
More file actions
105 lines (95 loc) · 3.3 KB
/
Copy pathMakefile
File metadata and controls
105 lines (95 loc) · 3.3 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# version 0.0.2
# created by : Team ViewTech
# date : 2025-06-05 | 08.47 WIB
# developer : Xenzi & Polygon (pejuang kentang)
########################################
PACKAGEBASH_TERMUX := curl python bc ncurses-utils file ossp-uuid uuid-utils less zsh boxes figlet ruby clang tree jq ripgrep coreutils xz-utils just fzf gum silversearcher-ag grep brotli toilet binutils python-pip bzip2 neofetch
PACKAGEBASH_DEBIAN := curl python3.13 python3.13-venv python3-pip bc ncurses-bin file ossp-uuid uuid-runtime less zsh boxes figlet ruby clang tree jq ripgrep coreutils xz-utils fzf silversearcher-ag grep brotli toilet binutils bzip2 neofetch
PACKAGEBASH_UBUNTU := $(PACKAGEBASH_DEBIAN)
PACKAGEPY := reques.txt
TERMUX_PATH := /data/data/com.termux/files/usr/bin/bash
detectCLI:
@echo "[?] Mengecek lingkungan..."
@if [ -f "$(TERMUX_PATH)" ]; then \
echo "[✓] Termux terdeteksi!"; \
OS_TYPE="termux"; \
elif [ -f "/etc/debian_version" ]; then \
grep -qi ubuntu /etc/os-release && OS_TYPE="ubuntu" || OS_TYPE="debian"; \
echo "[✓] $$OS_TYPE terdeteksi!"; \
else \
echo "[!] OS tidak didukung!"; \
exit 1; \
fi; \
echo $$OS_TYPE > .os_type
install-system: detectCLI
@OS_TYPE=$$(cat .os_type); \
echo "[?] Menginstall package..."; \
if [ "$$OS_TYPE" = "termux" ]; then \
PACKAGES="$(PACKAGEBASH_TERMUX)"; \
INSTALL_CMD="pkg install -y"; \
else \
PACKAGES="$(PACKAGEBASH_DEBIAN)"; \
INSTALL_CMD="sudo apt-get install -y"; \
sudo apt-get update; \
fi; \
for pkg in $$PACKAGES; do \
echo "[>] $$pkg"; \
yes | $$INSTALL_CMD $$pkg >/dev/null 2>&1; \
done
prepare-venv: detectCLI
@OS_TYPE=$$(cat .os_type); \
if [ "$$OS_TYPE" = "termux" ]; then \
exit 0; \
fi; \
echo "[>] Mengatur permission project..."; \
sudo chown -R $$(whoami):$$(whoami) "$$(pwd)"; \
if ! command -v python3.13 >/dev/null 2>&1; then \
echo ""; \
echo "[✗] Python 3.13 tidak ditemukan."; \
exit 1; \
fi; \
PYVER=$$(python3.13 -c 'import sys;print(f"{sys.version_info.major}.{sys.version_info.minor}")'); \
if [ "$$PYVER" != "3.13" ]; then \
echo "[✗] Python harus versi 3.13"; \
exit 1; \
fi; \
if [ ! -d venv ]; then \
echo "[>] Membuat Virtual Environment..."; \
python3.13 -m venv venv; \
fi; \
. venv/bin/activate && \
pip install --upgrade pip setuptools wheel
install-py: detectCLI prepare-venv
@OS_TYPE=$$(cat .os_type); \
if [ "$$OS_TYPE" = "termux" ]; then \
echo "[>] Install Python Package (Termux)..."; \
pip install -r $(PACKAGEPY); \
else \
echo "[>] Install Python Package (VENV)..."; \
. venv/bin/activate && \
pip install $(PACKAGEPY); \
fi
update: detectCLI
@echo "[>] Update repository..."
@cd && rm -rf Checker-Scammer
@git clone https://github.com/ViewTechOrg/Checker-Scammer
@cd Checker-Scammer && make install && just run
fix: detectCLI
@OS_TYPE=$$(cat .os_type); \
if [ "$$OS_TYPE" = "termux" ]; then \
pip uninstall requests -y; \
pip uninstall psutil -y; \
pip install requests; \
pip install "urllib3<2"; \
pip install --upgrade typing_extensions; \
bash python313.sh; \
else \
. venv/bin/activate && \
pip uninstall requests -y && \
pip uninstall psutil -y && \
pip install requests && \
pip install "urllib3<2"; \
fi
install: install-system prepare-venv install-py
all: install
.PHONY: detectCLI install-system prepare-venv install-py update fix install all