aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-03-06 15:28:55 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-03-12 15:27:15 +0100
commit47b67af2266e8706f8b047477c9db84c6282360a (patch)
tree9fc079b7d397fa726b51a4a54cdcc939ce67d517
parentc1362f54e585d2b17fac9232cbf845da34fa8707 (diff)
gps-track: drop main function, use :do with on-error
-rw-r--r--gps-track.rsc10
1 files changed, 4 insertions, 6 deletions
diff --git a/gps-track.rsc b/gps-track.rsc
index cef95f2..c40e2e0 100644
--- a/gps-track.rsc
+++ b/gps-track.rsc
@@ -11,8 +11,8 @@
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
-:local Main do={
- :local ScriptName [ :tostr $1 ];
+:do {
+ :local ScriptName [ :jobname ];
:global GpsTrackUrl;
:global Identity;
@@ -22,7 +22,7 @@
:global WaitFullyConnected;
:if ([ $ScriptLock $ScriptName ] = false) do={
- :return false;
+ :error false;
}
$WaitFullyConnected;
@@ -47,6 +47,4 @@
} else={
$LogPrintExit2 debug $ScriptName ("GPS data not valid.") false;
}
-}
-
-$Main [ :jobname ];
+} on-error={ }