termux-connecting 1.1.9 → 1.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/termux-connect-pc +1 -1
- package/bin/termux-connecting +27 -3
- package/package.json +1 -1
package/bin/termux-connect-pc
CHANGED
package/bin/termux-connecting
CHANGED
|
@@ -53,11 +53,18 @@ else
|
|
|
53
53
|
echo " Untuk mengganti ke repo stable, jalankan:"
|
|
54
54
|
echo " termux-change-repo"
|
|
55
55
|
echo ""
|
|
56
|
+
echo " Pilih mirror yang stabil:"
|
|
57
|
+
echo " - SourceForge (SF) — paling stabil"
|
|
58
|
+
echo " - Grimler — recommended"
|
|
59
|
+
echo " - Albatross — alternatif"
|
|
60
|
+
echo ""
|
|
56
61
|
echo -n " Ingin ganti repo sekarang? [y/N]: "
|
|
57
62
|
read -r change_repo
|
|
58
63
|
if [[ "$change_repo" =~ ^[Yy]$ ]]; then
|
|
59
64
|
termux-change-repo
|
|
60
|
-
echo "
|
|
65
|
+
echo ""
|
|
66
|
+
echo " Ulangi update setelah selesai:"
|
|
67
|
+
echo " termux-connecting"
|
|
61
68
|
fi
|
|
62
69
|
fi
|
|
63
70
|
|
|
@@ -70,7 +77,11 @@ for cmd in git node; do
|
|
|
70
77
|
echo -n " Install $cmd sekarang? [Y/n]: "
|
|
71
78
|
read -r install_it
|
|
72
79
|
if [[ -z "$install_it" || "$install_it" =~ ^[Yy]$ ]]; then
|
|
73
|
-
|
|
80
|
+
if [ "$cmd" = "node" ]; then
|
|
81
|
+
pkg install -y nodejs-lts && info "$cmd berhasil diinstall" || error "Gagal install $cmd"
|
|
82
|
+
else
|
|
83
|
+
pkg install -y "$cmd" && info "$cmd berhasil diinstall" || error "Gagal install $cmd"
|
|
84
|
+
fi
|
|
74
85
|
else
|
|
75
86
|
warn "Lewati install $cmd"
|
|
76
87
|
fi
|
|
@@ -93,8 +104,21 @@ fi
|
|
|
93
104
|
|
|
94
105
|
title "4. Informasi Koneksi"
|
|
95
106
|
USERNAME=$(whoami)
|
|
96
|
-
IP=$(ip -o -4 addr show | awk '{print $4}' | cut -d/ -f1 | grep -v 127.0.0.1 | head -n1)
|
|
97
107
|
|
|
108
|
+
# Deteksi IP — coba beberapa metode
|
|
109
|
+
IP=""
|
|
110
|
+
if command -v ip; then
|
|
111
|
+
IP=$(ip -4 addr show | awk '/inet /{print $2}' | cut -d/ -f1 | grep -v 127.0.0.1 | head -1)
|
|
112
|
+
fi
|
|
113
|
+
if [ -z "$IP" ] && command -v ifconfig; then
|
|
114
|
+
IP=$(ifconfig | awk '/inet /{print $2}' | grep -v 127.0.0.1 | head -1)
|
|
115
|
+
fi
|
|
116
|
+
if [ -z "$IP" ] && command -v hostname; then
|
|
117
|
+
IP=$(hostname -I 2>/dev/null | awk '{print $1}')
|
|
118
|
+
fi
|
|
119
|
+
if [ -z "$IP" ] && [ -d /data/data/com.termux ]; then
|
|
120
|
+
IP=$(ip route get 1.1.1.1 2>/dev/null | awk '{print $7}' | head -1)
|
|
121
|
+
fi
|
|
98
122
|
if [ -z "$IP" ]; then
|
|
99
123
|
IP="(tidak terdeteksi — pastikan WiFi/data aktif)"
|
|
100
124
|
fi
|