diff options
author | Christian Hesse <mail@eworm.de> | 2024-03-06 15:28:55 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-03-12 15:27:15 +0100 |
commit | 03309d4fdb3542c60e81b505ee9a9dc1fd623f5d (patch) | |
tree | 5508d7646c1c3b7bc727e6bedd560b197e8c7ec9 /capsman-download-packages.wifi.rsc | |
parent | 8d020a4de84cc86f0328a79c6e27bf87a35d45ba (diff) |
capsman-download-packages: drop main function, use :do with on-error
Diffstat (limited to 'capsman-download-packages.wifi.rsc')
-rw-r--r-- | capsman-download-packages.wifi.rsc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/capsman-download-packages.wifi.rsc b/capsman-download-packages.wifi.rsc index 89af381..633830a 100644 --- a/capsman-download-packages.wifi.rsc +++ b/capsman-download-packages.wifi.rsc @@ -14,8 +14,8 @@ :global GlobalFunctionsReady; :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } -:local Main do={ - :local ScriptName [ :tostr $1 ]; +:do { + :local ScriptName [ :jobname ]; :global CleanFilePath; :global DownloadPackage; @@ -25,7 +25,7 @@ :global WaitFullyConnected; :if ([ $ScriptLock $ScriptName ] = false) do={ - :return false; + :error false; } $WaitFullyConnected; @@ -80,6 +80,4 @@ /interface/wifi/capsman/remote-cap/upgrade [ find where version!=$InstalledVersion ]; } } -} - -$Main [ :jobname ]; +} on-error={ } |