This repository was archived by the owner on Jul 8, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- #! /bin/bash
1+ #! /usr/ bin/env bash
22
33RED=' \033[0;31m'
44GREEN=' \033[0;32m'
55YELLOW=' \033[0;33m'
66BLUE=' \033[1;94m'
7+ CYAN=' \033[0;36m'
78NC=' \033[0m'
89BOLD=' \033[1m'
910
@@ -12,20 +13,35 @@ CROSS_MARK="[✗]"
1213INFO_MARK=" [i]"
1314WARNING_MARK=" [!]"
1415
16+ LOG_FILE=" /tmp/.Blitz_install_$$ "
17+
18+ log_init () {
19+ echo " =================================" > " $LOG_FILE "
20+ echo " Log file created at $( date) " >> " $LOG_FILE "
21+ echo " =================================" >> " $LOG_FILE "
22+ echo " " >> " $LOG_FILE "
23+ chmod 644 " $LOG_FILE "
24+ }
25+
1526log_info () {
1627 echo -e " ${BLUE}${INFO_MARK} ${1}${NC} "
28+ echo " [INFO] $1 " >> " $LOG_FILE "
1729}
1830
1931log_success () {
2032 echo -e " ${GREEN}${CHECK_MARK} ${1}${NC} "
33+ echo " [ OK ] $1 " >> " $LOG_FILE "
34+ echo " " >> " $LOG_FILE "
2135}
2236
2337log_warning () {
2438 echo -e " ${YELLOW}${WARNING_MARK} ${1}${NC} "
39+ echo " [WARN] $1 " >> " $LOG_FILE "
2540}
2641
2742log_error () {
2843 echo -e " ${RED}${CROSS_MARK} ${1}${NC} " >&2
44+ echo " [ERROR] $1 " >> " $LOG_FILE "
2945}
3046
3147handle_error () {
@@ -272,20 +288,34 @@ run_menu() {
272288
273289main () {
274290 echo -e " \n${BOLD}${BLUE} ======== Blitz Setup Script ========${NC} \n"
275-
291+ log_init
292+
276293 check_root
277294 check_os_version
278295 install_packages
279296 download_and_extract_release
280297 setup_python_env
281298 add_alias
282-
299+
283300 source ~ /.bashrc & > /dev/null || true
284-
301+
302+ echo -e " \n${CYAN} Installation logs can be found at: ${LOG_FILE}${NC} \n"
303+ echo -e " ${CYAN} Press ${YELLOW}${BOLD} ENTER${NC}${CYAN} to continue...${NC} "
304+ read -r
285305 echo -e " \n${YELLOW} Starting Blitz in 3 seconds...${NC} "
286- sleep 3
287-
306+ for i in {3..1};
307+ do
308+ if [ $i -eq 1 ]; then
309+ echo -ne " ${RED} $i second left...${NC} \r"
310+ else
311+ echo -ne " ${YELLOW} $i seconds left...${NC} \r"
312+ fi
313+ sleep 1
314+ done
315+
316+ echo -ne " \r\033[KSetup complete! Starting menu!"
317+ sleep 2
288318 run_menu
289319}
290320
291- main
321+ main
You can’t perform that action at this time.
0 commit comments