Compare commits

..

2 commits

Author SHA1 Message Date
Christian Hesse
bebf0206fe global-functions: set and fix global scheduler automatically...
... and also adjust README and INITIAL-COMMANDS.
2025-11-15 16:39:51 +01:00
Christian Hesse
6e57826bbe contrib/commitinfo: support updating the commit info 2025-11-13 19:34:10 +01:00
3 changed files with 5 additions and 7 deletions

View file

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

View file

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

View file

@ -1900,11 +1900,10 @@
} }
} }
# 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={ :if ([ :len [ /system/scheduler/find where name="global-scripts" ] ] = 0) do={
/system/scheduler/add name="global-scripts" start-time=startup; /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={ :if ([ /system/scheduler/get "global-scripts" on-event ] != $OnEvent) do={
/system/scheduler/set "global-scripts" on-event=$OnEvent; /system/scheduler/set "global-scripts" on-event=$OnEvent;
} }