aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2018-08-27 11:15:03 +0200
committerGravatar Christian Hesse <mail@eworm.de>2018-08-27 11:15:03 +0200
commit21f2b04f9a7870d92aff22963a74da1758b7e43d (patch)
treeb220eb615b382e5e447f46bebf5bcb13aac798c7
parent529acebc7bf57a6407d35c0bfc7aca11d04a08fe (diff)
script-updates: add support for url suffix
This allows to fetch from different branch...
-rw-r--r--global-config1
-rw-r--r--script-updates3
2 files changed, 3 insertions, 1 deletions
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);