From 21f2b04f9a7870d92aff22963a74da1758b7e43d Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 27 Aug 2018 11:15:03 +0200 Subject: script-updates: add support for url suffix This allows to fetch from different branch... --- global-config | 1 + script-updates | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/global-config b/global-config index 35da36c..3b24e0f 100644 --- a/global-config +++ b/global-config @@ -46,6 +46,7 @@ :global "script-updates-baseurl" "https://git.eworm.de/cgit.cgi/routeros-scripts/plain/"; #:global "script-updates-baseurl" "https://raw.githubusercontent.com/eworm-de/routeros-scripts/master/"; #:global "script-updates-baseurl" "https://gitlab.com/eworm-de/routeros-scripts/raw/master/"; +:global "script-updates-urlsuffix" ""; :global "script-updates-ignore" { "global-config"; "GeneratePSK" }; # Do *NOT* change these! diff --git a/script-updates b/script-updates index 8267ebf..ccfdd58 100644 --- a/script-updates +++ b/script-updates @@ -6,6 +6,7 @@ :global "script-updates-fetch"; :global "script-updates-baseurl"; +:global "script-updates-urlsuffix"; :global "script-updates-ignore"; :foreach script in=[ / system script find ] do={ @@ -23,7 +24,7 @@ :do { / tool fetch check-certificate=yes-without-crl \ dst-path=("script-updates/" . $scriptname) \ - ($"script-updates-baseurl" . $scriptname); + ($"script-updates-baseurl" . $scriptname . $"script-updates-urlsuffix"); :set scriptfile [ / file find where name=("script-updates/" . $scriptname) ]; } on-error={ :log debug ("Failed fetching " . $scriptname); -- cgit v1.2.3-54-g00ecf