mirror of
https://github.com/bin456789/reinstall.git
synced 2025-06-09 05:50:03 +00:00
core: 添加重试提示
This commit is contained in:
parent
837827f30e
commit
0da940b2a7
@ -342,7 +342,7 @@ zh-tw
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
bash reinstall.sh windows \
|
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"
|
--iso "https://go.microsoft.com/fwlink/?linkid=2289029"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -342,7 +342,7 @@ zh-tw
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
bash reinstall.sh windows \
|
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"
|
--iso "https://go.microsoft.com/fwlink/?linkid=2289029"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
6
trans.sh
6
trans.sh
@ -46,6 +46,8 @@ warn() {
|
|||||||
|
|
||||||
error_and_exit() {
|
error_and_exit() {
|
||||||
error "$@"
|
error "$@"
|
||||||
|
echo "Run '/trans.sh' to retry." >&2
|
||||||
|
echo "Run '/trans.sh alpine' to install Alpine Linux instead." >&2
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,10 +55,12 @@ trap_err() {
|
|||||||
line_no=$1
|
line_no=$1
|
||||||
ret_no=$2
|
ret_no=$2
|
||||||
|
|
||||||
error "Line $line_no return $ret_no"
|
error_and_exit "$(
|
||||||
|
echo "Line $line_no return $ret_no"
|
||||||
if [ -f "/trans.sh" ]; then
|
if [ -f "/trans.sh" ]; then
|
||||||
sed -n "$line_no"p /trans.sh
|
sed -n "$line_no"p /trans.sh
|
||||||
fi
|
fi
|
||||||
|
)"
|
||||||
}
|
}
|
||||||
|
|
||||||
is_run_from_locald() {
|
is_run_from_locald() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user