|
补一个CURL版的
- @echo off
- echo 最新版检测中,请稍候...
- set tempfilename=g4dtemp%random%.log
- bin\curl http://grub4dos.chenall.net>>%temp%\%tempfilename% 2>nul
- for /f "tokens=2,3 delims=/" %%a in ('type "%temp%\%tempfilename%" ^| findstr /i "<h1.*.7z" ^| find /n /v "" ^| find "[1]"') do (
- set "name=%%b"
- set "tempurl=http://grub4dos.chenall.net/%%a/%%b"
- )
- set tempfilename=g4dtemp%random%.log
- bin\curl %tempurl%/>>%temp%\%tempfilename% 2>nul
- for /f tokens^=2^ delims^=^" %%i in ('type "%temp%\%tempfilename%" ^| find "<tr><td>File:</td><td><a href="') do set "url=%%i"
- cls & echo;最新版: %name%
- del %temp%\g4d*.log
- bin\curl %url% -o %temp%\%name%.7z
- bin\7z e %temp%\%name%.7z grub4dos-0.4.6a\grldr -aoa
- del %temp%\%name%.7z
复制代码 |
|