diff --git a/yazi.sh b/yazi.sh index d3cb030..33d693e 100644 --- a/yazi.sh +++ b/yazi.sh @@ -18,12 +18,24 @@ # CAUTION: # This only wokrs for generic package names, like neovim, or vim, or tmux etc.. # not every package packagemanager has the same packagenames for their packages.. - if command_exists curl; then - eval "$(curl -fsSL https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh)" - else - echo "curl is required, but missing.." - exit 1 - fi + getImports() { + i="https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh" + import="$(mktemp)" + if command_exists curl; then + curl -fsSL https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh -o $import + else + echo "curl is required, but missing.." + exit 1 + fi + + source "$import" + } + # if command_exists curl; then + # eval "$(curl -fsSL https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh)" + # else + # echo "curl is required, but missing.." + # exit 1 + # fi checkDependencies() { local deps=( @@ -85,5 +97,7 @@ fi } - main + if getImports; then + main + fi }