mirror of
https://codeberg.org/hyperreal/dotfiles
synced 2024-11-25 03:43:43 +01:00
Verify checksums OK
This commit is contained in:
parent
509f695257
commit
8addafd4b9
25
install.sh
25
install.sh
@ -14,6 +14,7 @@ apt_packages=(
|
||||
calibre
|
||||
cmake
|
||||
curl
|
||||
direnv
|
||||
duf
|
||||
emacs
|
||||
firewalld
|
||||
@ -190,6 +191,7 @@ function install_packages() {
|
||||
sudo apt install -y "${apt_packages[@]}"
|
||||
install_makedeb_prebuilt_packages
|
||||
install_starship
|
||||
install_zellij
|
||||
fi
|
||||
|
||||
if test -f /etc/redhat-release; then
|
||||
@ -228,15 +230,30 @@ function install_rpmfusion_packages() {
|
||||
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() {
|
||||
action_label "INSTALLING CHARM PACKAGES"
|
||||
|
||||
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 "$ARCH" | cut -d : -f 2,3 | tr -d '"' | wget -qi -
|
||||
sudo dpkg -i gum*.deb
|
||||
sudo apt -f install
|
||||
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" | 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 apt -f install
|
||||
fi
|
||||
rm -v gum*
|
||||
rm -v checksums.txt
|
||||
fi
|
||||
|
||||
if test -f /etc/redhat-release; then
|
||||
|
Loading…
Reference in New Issue
Block a user