From c4002eff68417d855ff5c8f9cc4ba8b40bf42444 Mon Sep 17 00:00:00 2001 From: pika Date: Thu, 22 May 2025 11:01:36 +0200 Subject: [PATCH] testing.. --- neovim.sh | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/neovim.sh b/neovim.sh index 6f1defc..4f5d76e 100644 --- a/neovim.sh +++ b/neovim.sh @@ -19,21 +19,30 @@ # 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.. getImports() { - i="https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh" - import="$(mktemp)" - if command_exists curl; then - curl -fsSL $i -o $import + local url="$1" + local import="$(mktemp)" + + # ─< if $1 is a local file, source this one instead >───────────────────────────────────── + if [ -f "$url" ]; then + source "$url" + sleep 0.1 + return 0 else - echo "curl is required, but missing.." - exit 1 + echo_info "Sourcing external script:${NC} $url" + # ─< if $1 is a url, grab it and source it, also deletes afterwards >───────────────────── + if command_exists curl; then + curl -fsSL $url -o $import + elif command_exists wget; then + wget -o $import $url + else + echo "curl/wget is required, but missing.." + exit 69 + fi + + source "$import" + sleep 0.1 + rm -f "$import" fi - - source "$import" - sleep 0.3 - rm "$import" - # echo_warning "cleaned $import" - - source-script "https://git.k4li.de/pika/beddu/raw/branch/main/dist/beddu.sh" } # command for executing silent mode only when nessessairy @@ -239,7 +248,7 @@ checkAndInitConfig ─────────────────────────────────────────────────────────────────── unset PACKAGE