global-functions: $FetchUserAgentStr: user $CommitBrief

This commit is contained in:
Christian Hesse 2026-01-20 11:23:17 +01:00
parent edd184db8f
commit f7cd7d7729

View file

@ -572,16 +572,13 @@
:set FetchUserAgentStr do={
:local Caller [ :tostr $1 ];
:global CommitId;
:global CommitInfo;
:global CommitBrief;
:global IfThenElse;
:local Resource [ /system/resource/get ];
:return ("User-Agent: Mikrotik/" . $Resource->"version" . " " . $Resource->"architecture-name" . \
" " . $Caller . "/Fetch (https://rsc.eworm.de/" . [ $IfThenElse ($CommitId != "unknown") \
("; " . $CommitInfo . "/" . [ :pick $CommitId 0 8 ]) ] . ")");
" " . $Caller . "/Fetch (https://rsc.eworm.de/; " . [ $CommitBrief ] . ")");
}
# check for existence of file, optionally with type