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:
|
# CAUTION:
|
||||||
# This only wokrs for generic package names, like neovim, or vim, or tmux etc..
|
# 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..
|
# not every package packagemanager has the same packagenames for their packages..
|
||||||
if command_exists curl; then
|
getImports() {
|
||||||
eval "$(curl -fsSL https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh)"
|
i="https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh"
|
||||||
else
|
import="$(mktemp)"
|
||||||
echo "curl is required, but missing.."
|
if command_exists curl; then
|
||||||
exit 1
|
curl -fsSL https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh -o $import
|
||||||
fi
|
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() {
|
checkDependencies() {
|
||||||
local deps=(
|
local deps=(
|
||||||
|
@ -85,5 +97,7 @@
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
main
|
if getImports; then
|
||||||
|
main
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue