Compare commits

..

2 commits

Author SHA1 Message Date
Christian Hesse
c80dd7d891 global-functions: add and fix global scheduler automatically...
... and also adjust README and INITIAL-COMMANDS.
2025-11-15 19:17:46 +01:00
Christian Hesse
1e65df49fb contrib/commitinfo: support updating the commit info 2025-11-15 18:45:35 +01:00
3 changed files with 7 additions and 5 deletions

View file

@ -21,8 +21,9 @@ checksums: checksums.json
checksums.json: contrib/checksums.sh $(ALL_RSC)
contrib/checksums.sh > $@
commitinfo:
contrib/commitinfo.sh
commitinfo: global-functions.rsc
contrib/commitinfo.sh $< > $<~
mv $<~ $<
docs: $(HTML)

View file

@ -1,6 +1,6 @@
#!/bin/sh
sed -i \
sed \
-e "/^:global CommitId/c :global CommitId \"${COMMITID:-unknown}\";" \
-e "/^:global CommitInfo/c :global CommitInfo \"${COMMITINFO:-unknown}\";" \
global-functions.rsc
< "${1}"

View file

@ -1900,10 +1900,11 @@
}
}
# add (and fix) global scripts scheduler
:local OnEvent "/system/script { run global-config; run global-functions; }";
:if ([ :len [ /system/scheduler/find where name="global-scripts" ] ] = 0) do={
/system/scheduler/add name="global-scripts" start-time=startup;
}
:local OnEvent "/system/script { run global-config; run global-functions; }";
:if ([ /system/scheduler/get "global-scripts" on-event ] != $OnEvent) do={
/system/scheduler/set "global-scripts" on-event=$OnEvent;
}