Непредвиденное появление: package_extract_file("product.transfer.list").
set LINE=block_image_update^(map_partition^("product_a"^), package_extract_file^("product.transfer.list"^), "product.new.dat.br", "product.patch.dat"^) ^^^|^^^| abort("E2001: Failed to update product image.");
:setlanguage
set count=0
cecho {!colG!}!str_selectlang!{# #}{\n}
FOR %%F IN (%bindir%language\*.lng) DO (
set /A count+=1
set name!count!=%%~nF
echo !count! = %%~nF
)
:_language
set INPUT=
set /P INPUT=!str_makechoice!
if !INPUT! GTR !count! (goto _language)
if !INPUT! LSS 1 (goto _language)
set language=!name%INPUT%!
echo language=!language!>%bindir%language\lang
:__language
chcp 1252>nul
for /F "eol=; tokens=1* delims==" %%a in ('type "%bindir%language\english.lng"') do set str_%%a=%%b
if "!language!"=="english" goto:eof
for /F "eol=; tokens=1* delims==" %%a in ('type "%bindir%language\!language!.lng"') do (
if "%%a"=="codepage" chcp %%b>nul
)
for /F "eol=; tokens=1* delims==" %%a in ('type "%bindir%language\!language!.lng"') do set str_%%a=%%b
goto:eof
langset=ru
lng_read() {
(grep -E "^${2}=" -m 1 "${1}" 2>/dev/null || echo "") | head -n 1 | cut -d '=' -f 2-;
}
lng() {
val="$(lng_read $dir/lang/$langset.lng "${1}")";
printf -- "%s" "${val}";
}
"$(lng lng_title)"