-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit-get.sh
More file actions
68 lines (59 loc) · 2.1 KB
/
Copy pathgit-get.sh
File metadata and controls
68 lines (59 loc) · 2.1 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
#!/data/data/com.termux/files/usr/bin/bash
# ─────────────────────────────────────────
# GIT-GET — git-get.sh (main)
# Dev: Md. Mainul Islam (CODEX-M41NUL)
# ─────────────────────────────────────────
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/config.sh"
source "$SCRIPT_DIR/utils.sh"
source "$SCRIPT_DIR/banner.sh"
source "$SCRIPT_DIR/updater.sh"
source "$SCRIPT_DIR/downloader.sh"
_menu_header() {
echo -e "\n ${Y}${B}+$(printf '%0.s=' $(seq 1 44))+${RST}"
echo -e " ${Y}${B}|${G} MAIN MENU -- GIT-GET ${Y}|${RST}"
echo -e " ${Y}${B}+$(printf '%0.s=' $(seq 1 44))+${RST}\n"
}
_option() {
echo -e " ${Y}${B}[$1]${RST} ${G}${B}$2${RST}"
echo -e " ${DIM}${W}$3${RST}\n"
}
main_menu() {
while true; do
clear_screen
print_banner
print_info_box
_menu_header
_option "1" "Download as ZIP" \
"Download entire repo as a ZIP file"
_option "2" "Download as Folder" \
"Download and extract repo as a folder"
_option "0" "Exit" \
"Quit GIT-GET"
separator
local choice
choice=$(prompt_input "Select option")
case "$choice" in
1) handle_download_zip ;;
2) handle_download_folder ;;
0)
echo -e "\n ${G}${B}Goodbye from GIT-GET!${RST}"
echo -e " ${Y}github.com/M41NUL | t.me/codexm41nul${RST}\n"
exit 0 ;;
*)
warn_msg "Invalid option."
sleep 1 ;;
esac
done
}
# ── Entry point ───────────────────────────────────────────────────────────────
clear_screen
print_banner
separator
info_msg "Initializing GIT-GET..."
echo ""
check_and_update
echo ""
ok_msg "Ready! Loading main menu..."
sleep 1
main_menu