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.capsman.rsc | |
parent | 8d020a4de84cc86f0328a79c6e27bf87a35d45ba (diff) |
capsman-download-packages: drop main function, use :do with on-error
Diffstat (limited to 'capsman-download-packages.capsman.rsc')
-rw-r--r-- | capsman-download-packages.capsman.rsc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/capsman-download-packages.capsman.rsc b/capsman-download-packages.capsman.rsc index cb82a37..d4e900d 100644 --- a/capsman-download-packages.capsman.rsc +++ b/capsman-download-packages.capsman.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; @@ -78,6 +78,4 @@ /caps-man/remote-cap/upgrade [ find where version!=$InstalledVersion ]; } } -} - -$Main [ :jobname ]; +} on-error={ } |