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:
|
# 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 $i -o $import
|
||||||
fi
|
else
|
||||||
|
echo "curl is required, but missing.."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
source "$import"
|
||||||
|
sleep 0.3
|
||||||
|
rm "$import"
|
||||||
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
case "$distro" in
|
case "$distro" in
|
||||||
arch)
|
arch)
|
||||||
echo "arch"
|
echo "arch"
|
||||||
;;
|
;;
|
||||||
debian | ubuntu)
|
debian)
|
||||||
echo "debian"
|
echo "debian"
|
||||||
;;
|
;;
|
||||||
|
ubuntu)
|
||||||
|
echo "ubuntu"
|
||||||
|
;;
|
||||||
fedora)
|
fedora)
|
||||||
echo "fedora"
|
echo "fedora"
|
||||||
;;
|
;;
|
||||||
|
alpine)
|
||||||
|
echo "alpine"
|
||||||
|
;;
|
||||||
|
opensuse)
|
||||||
|
echo "opensuse"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$distro is not supported by this script!"
|
echo "$distro is not supported by this script!"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -43,5 +60,7 @@
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
main
|
if getImports; then
|
||||||
|
main
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue