Przeglądaj źródła

重写解压脚本,改为全英文,避免运行过程中由于中文编码导致的异常

ZhangXK 8 miesięcy temu
rodzic
commit
6e82920e6e
1 zmienionych plików z 10 dodań i 22 usunięć
  1. 10 22
      extract.bat

+ 10 - 22
extract.bat

@@ -1,41 +1,29 @@
 @echo off
-REM 检查是否提供了参数
+REM Check whether parameters are provided.
 if "%~1"=="" (
-    echo 错误:请指定要解压的压缩包路径。
+    echo err: Please specify the path of the compressed package to extract.
     exit /b 1
 )
 
-REM 获取压缩包路径
+REM Get the compressed package path
 set "archive_path=%~1"
 
-REM 检查压缩包是否存在
+REM Check whether the compressed package exists.
 if not exist "%archive_path%" (
-    echo 错误:压缩包不存在 - %archive_path%
+    echo Error: The compressed package does not exist - %archive_path%
     exit /b 1
 )
 
-REM 使用 tar 解压缩到当前目录
-echo 正在解压缩:%archive_path%
+REM Extract to the current directory using tar.
+echo Decompressing:%archive_path%
 tar -xzvf "%archive_path%" -C .
 
-REM 检查是否成功
+REM Check whether it is successful.
 if errorlevel 1 (
-    echo 错误:解压缩失败。
+    echo Error: Decompression failed.
     exit /b 1
 ) else (
-    echo 解压缩成功!内容已解压到当前目录。
+    echo Decompression succeeded! The content has been extracted to the current directory.
 )
 
-REM 删除压缩包
-REM echo 正在删除压缩包:%archive_path%
-REM del "%archive_path%"
-
-REM 检查是否成功删除
-REM if errorlevel 1 (
-REM    echo 错误:删除压缩包失败。
-REM    exit /b 1
-REM ) else (
-REM    echo 压缩包已成功删除。
-REM )
-
 exit /b 0