tryed better way for getting import script
This commit is contained in:
parent
a386e00079
commit
cd9fd58475
1 changed files with 21 additions and 7 deletions
28
yazi.sh
28
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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue