Verify checksums OK

This commit is contained in:
Jeffrey Serio 2024-11-24 06:18:57 -06:00
parent 509f695257
commit 8addafd4b9

View File

@ -14,6 +14,7 @@ apt_packages=(
calibre calibre
cmake cmake
curl curl
direnv
duf duf
emacs emacs
firewalld firewalld
@ -190,6 +191,7 @@ function install_packages() {
sudo apt install -y "${apt_packages[@]}" sudo apt install -y "${apt_packages[@]}"
install_makedeb_prebuilt_packages install_makedeb_prebuilt_packages
install_starship install_starship
install_zellij
fi fi
if test -f /etc/redhat-release; then if test -f /etc/redhat-release; then
@ -228,15 +230,30 @@ function install_rpmfusion_packages() {
sudo dnf install -y --allowerasing ffmpeg-libs sudo dnf install -y --allowerasing ffmpeg-libs
} }
install_zellij() {
if test -f /etc/debian_version; then
curl -s https://api.github.com/repos/zellij-org/zellij/releases/latest | grep "browser_download_url" | grep "zellij-$(uname -m)-unknown-linux-musl.tar.gz" | cut -d : -f 2,3 | tr -d '"' | wget -qi -
curl -s https://api.github.com/repos/zellij-org/zellij/releases/latest | grep "browser_download_url" | grep "zellij-$(uname -m)-unknown-linux-musl.sha256sum" | cut -d : -f 2,3 | tr -d '"' | wget -qi -
tar xvf "zellij-$(uname -m)-unknown-linux-musl.tar.gz"
if [ $(sha256sum -c "zellij-$(uname -m)-unknown-linux-musl.sha256sum" | head -n 1 | awk '{print $2}') = "OK" ]; then
sudo mv zellij /usr/local/bin
fi
rm -v zellij*
fi
}
function install_charm_packages() { function install_charm_packages() {
action_label "INSTALLING CHARM PACKAGES" action_label "INSTALLING CHARM PACKAGES"
if test -f /etc/debian_version; then if test -f /etc/debian_version; then
ARCH=$(dpkg --print-architecture) curl -s https://api.github.com/repos/charmbracelet/gum/releases/latest | grep "browser_download_url.*deb" | grep "$(dpkg --print-architecture)" | cut -d : -f 2,3 | tr -d '"' | wget -qi -
curl -s https://api.github.com/repos/charmbracelet/gum/releases/latest | grep "browser_download_url.*deb" | grep "$ARCH" | cut -d : -f 2,3 | tr -d '"' | wget -qi - curl -s https://api.github.com/repos/charmbracelet/gum/releases/latest | grep "browser_download_url" | grep "checksums.txt" | head -n 1 | cut -d : -f 2,3 | tr -d '"' | wget -qi -
if [ $(grep "$(dpkg --print-architecture).deb" checksums.txt | sha256sum -c | head -n 1 | awk '{print $2}') = "OK" ]; then
sudo dpkg -i gum*.deb sudo dpkg -i gum*.deb
sudo apt -f install sudo apt -f install
fi
rm -v gum* rm -v gum*
rm -v checksums.txt
fi fi
if test -f /etc/redhat-release; then if test -f /etc/redhat-release; then