From 0da940b2a79aeb41bd4b9f4cb8110228a4bae25b Mon Sep 17 00:00:00 2001 From: bin456789 Date: Thu, 20 Mar 2025 21:55:38 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E6=B7=BB=E5=8A=A0=E9=87=8D=E8=AF=95?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.en.md | 2 +- README.md | 2 +- trans.sh | 12 ++++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.en.md b/README.en.md index 5f146fc..24ec79c 100644 --- a/README.en.md +++ b/README.en.md @@ -342,7 +342,7 @@ zh-tw ```bash bash reinstall.sh windows \ - --image-name "Windows 11 Enterprise LTSC 2024" \ + --image-name "Windows 11 Enterprise LTSC 2024 Evaluation" \ --iso "https://go.microsoft.com/fwlink/?linkid=2289029" ``` diff --git a/README.md b/README.md index 6d6f69e..fb66e81 100644 --- a/README.md +++ b/README.md @@ -342,7 +342,7 @@ zh-tw ```bash bash reinstall.sh windows \ - --image-name "Windows 11 Enterprise LTSC 2024" \ + --image-name "Windows 11 Enterprise LTSC 2024 Evaluation" \ --iso "https://go.microsoft.com/fwlink/?linkid=2289029" ``` diff --git a/trans.sh b/trans.sh index 71d88f6..412e178 100644 --- a/trans.sh +++ b/trans.sh @@ -46,6 +46,8 @@ warn() { error_and_exit() { error "$@" + echo "Run '/trans.sh' to retry." >&2 + echo "Run '/trans.sh alpine' to install Alpine Linux instead." >&2 exit 1 } @@ -53,10 +55,12 @@ trap_err() { line_no=$1 ret_no=$2 - error "Line $line_no return $ret_no" - if [ -f "/trans.sh" ]; then - sed -n "$line_no"p /trans.sh - fi + error_and_exit "$( + echo "Line $line_no return $ret_no" + if [ -f "/trans.sh" ]; then + sed -n "$line_no"p /trans.sh + fi + )" } is_run_from_locald() {