From 4eba04b9c4b202ed2dec50ea37b36212ff1ad2e8 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 12 Oct 2018 11:12:45 +0200 Subject: script-updates: allow to set dont-require-permissions=yes This requires the new script to contain a line: # requires: dont-require-permissions=yes --- script-updates | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'script-updates') diff --git a/script-updates b/script-updates index cae182d..98d2440 100644 --- a/script-updates +++ b/script-updates @@ -53,8 +53,11 @@ :if ([ :pick $sourcenew 0 5 ] = "#!rsc") do={ :local sourcecurrent [ / system script get $script source ]; :if ($sourcenew != $sourcecurrent) do={ + :local "dont-require-permissions" \ + ($sourcenew~"\n# requires: dont-require-permissions=yes\n"); :log info ("Updating script: " . $scriptname); - / system script set owner=$scriptname source=$sourcenew $script; + / system script set owner=$scriptname source=$sourcenew \ + dont-require-permissions=$"dont-require-permissions" $script; } else={ :log debug ("Script " . $scriptname . " did not change"); } -- cgit v1.2.3-70-g09d2