mirror of
https://github.com/kuhyx/scripts.git
synced 2026-07-04 17:03:13 +02:00
feat: add ignore packages block minecraft hosts and do not reinstall latex packages
This commit is contained in:
parent
556e374236
commit
59ea3c8293
@ -350,11 +350,54 @@ pacman_packages=(
|
|||||||
)
|
)
|
||||||
|
|
||||||
for pkg in "${pacman_packages[@]}"; do
|
for pkg in "${pacman_packages[@]}"; do
|
||||||
if ! pacman -Qi $pkg > /dev/null 2>&1; then
|
# Check for texlive subpackages
|
||||||
# Check if the package exists in the AUR packages list
|
if [ "$pkg" == "texlive" ]; then
|
||||||
|
sub_pkgs=(
|
||||||
|
texlive-basic texlive-bibtexextra texlive-binextra texlive-context texlive-fontsextra
|
||||||
|
texlive-fontsrecommended texlive-fontutils texlive-formatsextra texlive-games texlive-humanities
|
||||||
|
texlive-latex texlive-latexextra texlive-latexrecommended texlive-luatex texlive-mathscience
|
||||||
|
texlive-metapost texlive-music texlive-pictures texlive-plaingeneric texlive-pstricks
|
||||||
|
texlive-publishers texlive-xetex
|
||||||
|
)
|
||||||
|
all_installed=true
|
||||||
|
for subpkg in "${sub_pkgs[@]}"; do
|
||||||
|
if ! pacman -Qi "$subpkg" &> /dev/null; then
|
||||||
|
all_installed=false
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ "$all_installed" = true ]; then
|
||||||
|
echo "All texlive subpackages are installed, skipping texlive"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check for texlive-lang subpackages
|
||||||
|
if [ "$pkg" == "texlive-lang" ]; then
|
||||||
|
sub_pkgs=(
|
||||||
|
texlive-langarabic texlive-langchinese texlive-langcjk texlive-langcyrillic
|
||||||
|
texlive-langczechslovak texlive-langenglish texlive-langeuropean texlive-langfrench
|
||||||
|
texlive-langgerman texlive-langgreek texlive-langitalian texlive-langjapanese
|
||||||
|
texlive-langkorean texlive-langother texlive-langpolish texlive-langportuguese
|
||||||
|
texlive-langspanish
|
||||||
|
)
|
||||||
|
all_installed=true
|
||||||
|
for subpkg in "${sub_pkgs[@]}"; do
|
||||||
|
if ! pacman -Qi "$subpkg" &> /dev/null; then
|
||||||
|
all_installed=false
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ "$all_installed" = true ]; then
|
||||||
|
echo "All texlive-lang subpackages are installed, skipping texlive-lang"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! pacman -Qi "$pkg" &> /dev/null; then
|
||||||
if ! echo "${aur_packages[@]}" | grep -q "$pkg"; then
|
if ! echo "${aur_packages[@]}" | grep -q "$pkg"; then
|
||||||
yes | sudo pacman -Sy --noconfirm $pkg
|
yes | sudo pacman -Sy --noconfirm "$pkg"
|
||||||
else
|
else
|
||||||
echo "$pkg exists in AUR packages, skipping pacman installation"
|
echo "$pkg exists in AUR packages, skipping pacman installation"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@ -413,7 +456,7 @@ aur_packages=(
|
|||||||
# "https://aur.archlinux.org/vtk-git.git vtk-git"
|
# "https://aur.archlinux.org/vtk-git.git vtk-git"
|
||||||
# "https://aur.archlinux.org/ant-git.git ant-git"
|
# "https://aur.archlinux.org/ant-git.git ant-git"
|
||||||
# "https://aur.archlinux.org/chrpath-git.git chrpath-git"
|
# "https://aur.archlinux.org/chrpath-git.git chrpath-git"
|
||||||
"https://aur.archlinux.org/openexr-git.git openexr-git"
|
#"https://aur.archlinux.org/openexr-git.git openexr-git"
|
||||||
|
|
||||||
# "https://aur.archlinux.org/gdb-git.git gdb-git"
|
# "https://aur.archlinux.org/gdb-git.git gdb-git"
|
||||||
"https://aur.archlinux.org/valgrind-git.git valgrind-git"
|
"https://aur.archlinux.org/valgrind-git.git valgrind-git"
|
||||||
@ -506,7 +549,6 @@ aur_packages=(
|
|||||||
# "https://aur.archlinux.org/vtk-git.git vtk-git"
|
# "https://aur.archlinux.org/vtk-git.git vtk-git"
|
||||||
# "https://aur.archlinux.org/ant-git.git ant-git"
|
# "https://aur.archlinux.org/ant-git.git ant-git"
|
||||||
# "https://aur.archlinux.org/chrpath-git.git chrpath-git"
|
# "https://aur.archlinux.org/chrpath-git.git chrpath-git"
|
||||||
"https://aur.archlinux.org/openexr-git.git openexr-git"
|
|
||||||
|
|
||||||
# "https://aur.archlinux.org/gdb-git.git gdb-git"
|
# "https://aur.archlinux.org/gdb-git.git gdb-git"
|
||||||
"https://aur.archlinux.org/valgrind-git.git valgrind-git"
|
"https://aur.archlinux.org/valgrind-git.git valgrind-git"
|
||||||
|
|||||||
@ -22,8 +22,8 @@ HoldPkg = pacman-git glibc
|
|||||||
Architecture = auto
|
Architecture = auto
|
||||||
|
|
||||||
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||||
#IgnorePkg =
|
IgnorePkg = steam steam-runtime prismlauncher prismlauncher-git youtube-music freetube freetube-git
|
||||||
#IgnoreGroup =
|
IgnoreGroup = steam steam-runtime prismlauncher prismlauncher-git youtube-music freetube freetube-git
|
||||||
|
|
||||||
#NoUpgrade =
|
#NoUpgrade =
|
||||||
#NoExtract =
|
#NoExtract =
|
||||||
|
|||||||
11
hosts/hosts
11
hosts/hosts
@ -31,4 +31,13 @@
|
|||||||
0.0.0.0 www.discordapp.com
|
0.0.0.0 www.discordapp.com
|
||||||
0.0.0.0 cdn.discordapp.com
|
0.0.0.0 cdn.discordapp.com
|
||||||
0.0.0.0 cdn.discord.com
|
0.0.0.0 cdn.discord.com
|
||||||
0.0.0.0 media.discordapp.net
|
0.0.0.0 media.discordapp.net
|
||||||
|
# Block Minecraft download sites
|
||||||
|
127.0.0.1 minecraft.net
|
||||||
|
127.0.0.1 www.minecraft.net
|
||||||
|
127.0.0.1 mojang.com
|
||||||
|
127.0.0.1 www.mojang.com
|
||||||
|
127.0.0.1 launcher.mojang.com
|
||||||
|
127.0.0.1 libraries.minecraft.net
|
||||||
|
127.0.0.1 files.minecraft.net
|
||||||
|
# 127.0.0.1 s3.amazonaws.com # If Minecraft uses Amazon S3 for downloads
|
||||||
Loading…
Reference in New Issue
Block a user