~优化测试相关命令

~优化版本回退功能,现在支持回退到近期tags
This commit is contained in:
juewuy
2026-01-21 19:15:49 +08:00
parent 9b7c5e658c
commit e8651591ff
2 changed files with 21 additions and 14 deletions

View File

@@ -248,24 +248,30 @@ case "$1" in
main_menu
;;
-t)
shtype=sh && [ -n "$(ls -l /bin/sh | grep -o dash)" ] && shtype=bash
$shtype -x "$CRASHDIR"/menu.sh
shtype=sh
[ -n "$(ls -l /bin/sh | grep -o dash)" ] && shtype=bash
"$shtype" -x "$CRASHDIR"/menu.sh
;;
-s)
"$CRASHDIR"/start.sh $2 $3 $4 $5 $6
"$CRASHDIR"/start.sh "$2" "$3" "$4" "$5" "$6"
;;
-i)
. "$CRASHDIR"/init.sh 2>/dev/null
;;
-st)
shtype=sh && [ -n "$(ls -l /bin/sh | grep -o dash)" ] && shtype=bash
$shtype -x "$CRASHDIR"/start.sh $2 $3 $4 $5 $6
shtype=sh
ckcmd bash && shtype=bash
"$shtype" -x "$CRASHDIR"/starts/bfstart.sh
. "$CRASHDIR"/starts/start_legacy.sh
start_legacy "$COMMAND" 'shellcrash'
"$shtype" -x "$CRASHDIR"/starts/afstart.sh
"$CRASHDIR"/start.sh stop
;;
-d)
shtype=sh && [ -n "$(ls -l /bin/sh | grep -o dash)" ] && shtype=bash
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 -x "$CRASHDIR"/start.sh debug >/dev/null 2>"$TMPDIR"/debug_sh.log
"$shtype" "$CRASHDIR"/start.sh debug >/dev/null 2>"$TMPDIR"/debug_sh_bug.log
"$shtype" -x "$CRASHDIR"/start.sh debug >/dev/null 2>"$TMPDIR"/debug_sh.log
echo -----------------------------------------
cat "$TMPDIR"/debug_sh_bug.log | grep 'start\.sh' >"$TMPDIR"/sh_bug
if [ -s "$TMPDIR"/sh_bug ]; then