diff options
author | Christian Hesse <mail@eworm.de> | 2018-10-12 11:12:45 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2018-10-12 11:15:46 +0200 |
commit | 4eba04b9c4b202ed2dec50ea37b36212ff1ad2e8 (patch) | |
tree | 4a7aab4171aacddcb5faec1442e36744f93e8507 | |
parent | 28df37708cd047e5d36d82d9ab2d1e0f612b3eff (diff) |
script-updates: allow to set dont-require-permissions=yes
This requires the new script to contain a line:
# requires: dont-require-permissions=yes
-rw-r--r-- | script-updates | 5 |
1 files changed, 4 insertions, 1 deletions
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"); } |