Old Package Detection

This commit is contained in:
MangoPig 2025-12-05 19:09:46 +00:00
parent cf670488ac
commit ece7ac7a0b

View File

@ -28,22 +28,57 @@ if [ "$ARCH" != "x86_64" ] && [ "$ARCH" != "aarch64" ]; then
exit 1
fi
# 2. Package Installation (OS Dependencies)
# Package Installation
PACKAGES=(
curl wget git sudo zsh tmux unzip tar gzip
openssl python bison mercurial
ripgrep fd bat fzf jq btop httpie gnupg zoxide stow
bind nmap socat tcpdump net-tools strace gdb hexyl
curl wget git sudo
zsh tmux
unzip tar gzip
build-essential
openssl
python bison mercurial
ripgrep fd bat fzf jq
btop httpie gnupg
zoxide stow
bind nmap socat tcpdump net-tools
strace gdb hexyl
rclone
)
if [ "$OS" == "arch" ] || [ "$OS" == "manjaro" ]; then
# Arch has eza in the community repo
sudo pacman -Sy --noconfirm --needed "${PACKAGES[@]}" base-devel
elif [ "$OS" == "ubuntu" ] || [ "$OS" == "debian" ]; then
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y "${PACKAGES[@]}" bsdmainutils pkg-config cmake build-essential
fi
FINAL_LIST=""
for pkg in "${PACKAGES[@]}"; do
case "$pkg" in
"build-essential")
[ "$OS" == "arch" ] && pkg="base-devel"
[ "$OS" == "ubuntu" ] && pkg="build-essential"
;;
"python")
[ "$OS" == "arch" ] && pkg="python"
[ "$OS" == "ubuntu" ] && pkg="python3 python3-pip python3-venv"
;;
"fd")
[ "$OS" == "arch" ] && pkg="fd"
[ "$OS" == "ubuntu" ] && pkg="fd-find"
;;
"bat")
[ "$OS" == "arch" ] && pkg="bat"
[ "$OS" == "ubuntu" ] && pkg="bat"
;;
"openssl")
[ "$OS" == "arch" ] && pkg="openssl"
[ "$OS" == "ubuntu" ] && pkg="libssl-dev"
;;
"bind")
[ "$OS" == "arch" ] && pkg="bind"
[ "$OS" == "ubuntu" ] && pkg="dnsutils"
;;
*)
esac
FINAL_LIST="$FINAL_LIST $pkg"
done
# Moving Pre-Built bin to .local/bin
mkdir -p "$HOME/.local/bin"