From 984b4858a6bd7c384846961131a7aef7679cffdd Mon Sep 17 00:00:00 2001 From: Tulili Date: Thu, 7 Mar 2024 09:43:25 -0300 Subject: [PATCH] fix: proper error handling for zluda script --- config/scripts/zluda.nu | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/config/scripts/zluda.nu b/config/scripts/zluda.nu index f1e6438..7c6a873 100755 --- a/config/scripts/zluda.nu +++ b/config/scripts/zluda.nu @@ -4,12 +4,13 @@ let ZLUDA_LATEST = (http get https://api.github.com/repos/vosen/ZLUDA/releases/l http get $ZLUDA_LATEST | save -f /tmp/zluda.tar.gz +mkdir /tmp/zluda + try { - mkdir /tmp/zluda tar --strip-components 1 -xvzf /tmp/zluda.tar.gz -C /tmp/zluda - mv /tmp/zluda /usr/lib64/zluda - rm -f /tmp/zluda.tar.gz } catch { - echo "Failed running ZLUDA script" + echo "Failed extracting the entire zluda file for some reason." } +rm -f /tmp/zluda.tar.gz +mv /tmp/zluda /usr/lib64/zluda