fixed some templates
This commit is contained in:
parent
6344337bf9
commit
8b50c3ef26
1 changed files with 27 additions and 8 deletions
35
template.sh
35
template.sh
|
@ -18,24 +18,41 @@
|
|||
# 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 $i -o $import
|
||||
else
|
||||
echo "curl is required, but missing.."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source "$import"
|
||||
sleep 0.3
|
||||
rm "$import"
|
||||
}
|
||||
|
||||
main() {
|
||||
case "$distro" in
|
||||
arch)
|
||||
echo "arch"
|
||||
;;
|
||||
debian | ubuntu)
|
||||
debian)
|
||||
echo "debian"
|
||||
;;
|
||||
ubuntu)
|
||||
echo "ubuntu"
|
||||
;;
|
||||
fedora)
|
||||
echo "fedora"
|
||||
;;
|
||||
alpine)
|
||||
echo "alpine"
|
||||
;;
|
||||
opensuse)
|
||||
echo "opensuse"
|
||||
;;
|
||||
*)
|
||||
echo "$distro is not supported by this script!"
|
||||
exit 1
|
||||
|
@ -43,5 +60,7 @@
|
|||
esac
|
||||
}
|
||||
|
||||
main
|
||||
if getImports; then
|
||||
main
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue