36 lines
945 B
Bash
Executable File
36 lines
945 B
Bash
Executable File
#! /bin/sh
|
|
|
|
YELLOW="\e[33m"
|
|
NC="\e[0m"
|
|
|
|
printf "%b\n" "${YELLOW}[+]${NC} Updating Arch using paru..."
|
|
paru
|
|
|
|
printf "%b\n" "${YELLOW}[+]${NC} Updating CPU microcode..."
|
|
vendor=$(grep -m 1 'vendor_id' /proc/cpuinfo | awk '{print $3}')
|
|
if [ "$vendor" == "GenuineIntel" ]; then
|
|
echo "CPU Detected: Intel"
|
|
paru -S intel-ucode --needed
|
|
elif [ "$vendor" == "AuthenticAMD" ]; then
|
|
echo "CPU Detected: AMD"
|
|
paru -S amd-ucode --needed
|
|
else
|
|
echo "Unknown CPU Vendor: $vendor"
|
|
fi
|
|
|
|
printf "%b\n" "${YELLOW}[+]${NC} Removing orphaned dependencies..."
|
|
sudo pacman -Rsn $(pacman -Qdtq)
|
|
|
|
printf "%b\n" "${YELLOW}[+]${NC} Checking for config changes..."
|
|
sudo pacdiff
|
|
|
|
printf "%b\n" "${YELLOW}[+]${NC} Checking for vulnerabilities..."
|
|
arch-audit -u
|
|
|
|
if command -v flatpak >/dev/null 2>&1; then
|
|
printf "%b\n" "${YELLOW}[+]${NC} Updating flatpak packages..."
|
|
flatpak update
|
|
flatpak uninstall --unused --delete-data
|
|
printf "%b" "${NC}"
|
|
fi
|