testing..
This commit is contained in:
parent
8f4f8b2e7c
commit
c4002eff68
1 changed files with 23 additions and 14 deletions
33
neovim.sh
33
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.3
|
||||
rm "$import"
|
||||
# echo_warning "cleaned $import"
|
||||
|
||||
source-script "https://git.k4li.de/pika/beddu/raw/branch/main/dist/beddu.sh"
|
||||
sleep 0.1
|
||||
rm -f "$import"
|
||||
fi
|
||||
}
|
||||
|
||||
# command for executing silent mode only when nessessairy
|
||||
|
@ -239,7 +248,7 @@
|
|||
checkAndInitConfig </dev/tty
|
||||
}
|
||||
|
||||
if getImports; then
|
||||
if getImports "https://git.k4li.de/scripts/beddu/raw/branch/main/dist/beddu.sh" && getImports "https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh"; then
|
||||
# ─< package variable >───────────────────────────────────────────────────────────────────
|
||||
unset PACKAGE
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue