From 07eef0b81b7f78ecbcc90ea14bb02e1e73a573ea Mon Sep 17 00:00:00 2001 From: arcolinuxz Date: Sat, 25 May 2024 08:47:14 +0200 Subject: [PATCH] .update --- archiso/airootfs/usr/local/bin/get-chadwm | 52 +++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/archiso/airootfs/usr/local/bin/get-chadwm b/archiso/airootfs/usr/local/bin/get-chadwm index 456ee2a..aed9a30 100755 --- a/archiso/airootfs/usr/local/bin/get-chadwm +++ b/archiso/airootfs/usr/local/bin/get-chadwm @@ -31,6 +31,58 @@ installed_dir=$(dirname $(readlink -f $(basename `pwd`))) ################################################################################################################## +sudo pacman -S wget --noconfirm --needed +sudo pacman -S jq --noconfirm --needed +arco_repo_db=$(wget -qO- https://api.github.com/repos/arcolinux/arcolinux_repo/contents/x86_64) +echo "Getting the ArcoLinux keys from the ArcoLinux repo" + +sudo wget "$(echo "$arco_repo_db" | jq -r '[.[] | select(.name | contains("arcolinux-keyring")) | .name] | .[0] | sub("arcolinux-keyring-"; "https://github.com/arcolinux/arcolinux_repo/raw/main/x86_64/arcolinux-keyring-")')" -O /tmp/arcolinux-keyring-git-any.pkg.tar.zst +sudo pacman -U --noconfirm --needed /tmp/arcolinux-keyring-git-any.pkg.tar.zst + +###################################################################################################################### + +echo "Getting the latest arcolinux mirrors file" + +sudo wget "$(echo "$arco_repo_db" | jq -r '[.[] | select(.name | contains("arcolinux-mirrorlist-git-")) | .name] | .[0] | sub("arcolinux-mirrorlist-git-"; "https://github.com/arcolinux/arcolinux_repo/raw/main/x86_64/arcolinux-mirrorlist-git-")')" -O /tmp/arcolinux-mirrorlist-git-any.pkg.tar.zst +sudo pacman -U --noconfirm --needed /tmp/arcolinux-mirrorlist-git-any.pkg.tar.zst + +if grep -q arcolinux_repo /etc/pacman.conf; then + + echo + tput setaf 2 + echo "################################################################" + echo "################ ArcoLinux repos are already in /etc/pacman.conf " + echo "################################################################" + tput sgr0 + echo + +else + +echo ' + +#[arcolinux_repo_testing] +#SigLevel = PackageRequired DatabaseNever +#Include = /etc/pacman.d/arcolinux-mirrorlist + +[arcolinux_repo] +SigLevel = PackageRequired DatabaseNever +Include = /etc/pacman.d/arcolinux-mirrorlist + +[arcolinux_repo_3party] +SigLevel = PackageRequired DatabaseNever +Include = /etc/pacman.d/arcolinux-mirrorlist + +[arcolinux_repo_xlarge] +SigLevel = PackageRequired DatabaseNever +Include = /etc/pacman.d/arcolinux-mirrorlist' | sudo tee --append /etc/pacman.conf + +fi + + +sudo pacman -Sy + + + func_install() { if pacman -Qi $1 &> /dev/null; then tput setaf 2