mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-12 16:31:25 +00:00
feat(9_upgrade.sh): redesign TUI
This commit is contained in:
@@ -26,8 +26,10 @@ load_lang common
|
|||||||
load_lang menu
|
load_lang menu
|
||||||
|
|
||||||
errornum() {
|
errornum() {
|
||||||
echo "-----------------------------------------------"
|
double_line_break
|
||||||
echo -e "\033[31m$MENU_ERR_INPUT\033[0m"
|
separator_line "="
|
||||||
|
content_line "\033[31m$MENU_ERR_INPUT\033[0m"
|
||||||
|
separator_line "="
|
||||||
}
|
}
|
||||||
|
|
||||||
checkrestart() {
|
checkrestart() {
|
||||||
@@ -239,24 +241,24 @@ main_menu() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"")
|
"")
|
||||||
main_menu
|
main_menu
|
||||||
;;
|
;;
|
||||||
-t)
|
-t)
|
||||||
shtype=sh && [ -n "$(ls -l /bin/sh | grep -o dash)" ] && shtype=bash
|
shtype=sh && [ -n "$(ls -l /bin/sh | grep -o dash)" ] && shtype=bash
|
||||||
$shtype -x "$CRASHDIR"/menu.sh
|
$shtype -x "$CRASHDIR"/menu.sh
|
||||||
;;
|
;;
|
||||||
-s)
|
-s)
|
||||||
"$CRASHDIR"/start.sh $2 $3 $4 $5 $6
|
"$CRASHDIR"/start.sh $2 $3 $4 $5 $6
|
||||||
;;
|
;;
|
||||||
-i)
|
-i)
|
||||||
. "$CRASHDIR"/init.sh 2>/dev/null
|
. "$CRASHDIR"/init.sh 2>/dev/null
|
||||||
;;
|
;;
|
||||||
-st)
|
-st)
|
||||||
shtype=sh && [ -n "$(ls -l /bin/sh | grep -o dash)" ] && shtype=bash
|
shtype=sh && [ -n "$(ls -l /bin/sh | grep -o dash)" ] && shtype=bash
|
||||||
$shtype -x "$CRASHDIR"/start.sh $2 $3 $4 $5 $6
|
$shtype -x "$CRASHDIR"/start.sh $2 $3 $4 $5 $6
|
||||||
;;
|
;;
|
||||||
-d)
|
-d)
|
||||||
shtype=sh && [ -n "$(ls -l /bin/sh | grep -o dash)" ] && shtype=bash
|
shtype=sh && [ -n "$(ls -l /bin/sh | grep -o dash)" ] && shtype=bash
|
||||||
echo -e "$MENU_TEST_RUNNING\033[32;4mt.me/ShellClash\033[0m"
|
echo -e "$MENU_TEST_RUNNING\033[32;4mt.me/ShellClash\033[0m"
|
||||||
$shtype "$CRASHDIR"/start.sh debug >/dev/null 2>"$TMPDIR"/debug_sh_bug.log
|
$shtype "$CRASHDIR"/start.sh debug >/dev/null 2>"$TMPDIR"/debug_sh_bug.log
|
||||||
@@ -277,10 +279,10 @@ case "$1" in
|
|||||||
fi
|
fi
|
||||||
"$CRASHDIR"/start.sh stop
|
"$CRASHDIR"/start.sh stop
|
||||||
;;
|
;;
|
||||||
-u)
|
-u)
|
||||||
. "$CRASHDIR"/menus/uninstall.sh && uninstall
|
. "$CRASHDIR"/menus/uninstall.sh && uninstall
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo -----------------------------------------
|
echo -----------------------------------------
|
||||||
echo "$MENU_CLI_WELCOME"
|
echo "$MENU_CLI_WELCOME"
|
||||||
echo -----------------------------------------
|
echo -----------------------------------------
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user