Improve update script and add vuln check
This commit is contained in:
@@ -60,12 +60,13 @@ window_width='60'
|
|||||||
W_MAIN=$(
|
W_MAIN=$(
|
||||||
whiptail --notags --title "Trude's Dotfiles" \
|
whiptail --notags --title "Trude's Dotfiles" \
|
||||||
--cancel-button "Exit" \
|
--cancel-button "Exit" \
|
||||||
--menu "Main Menu" $window_height $window_width 5 \
|
--menu "Main Menu" $window_height $window_width 6 \
|
||||||
"install" "Install Dotfiles" \
|
"install" "Install Dotfiles" \
|
||||||
"reload" "Reload Configuration" \
|
"reload" "Reload Configuration" \
|
||||||
"paru" "Install Paru AUR Helper" \
|
"paru" "Install Paru AUR Helper" \
|
||||||
"flatpak" "Install Flatpak" \
|
"flatpak" "Install Flatpak" \
|
||||||
"update" "Update Distro" \
|
"update" "Update Distro" \
|
||||||
|
"vulns" "Check for Vulnerabilities" \
|
||||||
3>&1 1>&2 2>&3
|
3>&1 1>&2 2>&3
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -104,6 +105,10 @@ if [ $W_MAIN = "flatpak" ]; then
|
|||||||
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $W_MAIN = "vulns" ]; then
|
||||||
|
arch-audit
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $W_MAIN = "paru" ]; then
|
if [ $W_MAIN = "paru" ]; then
|
||||||
sudo pacman -S --needed base-devel
|
sudo pacman -S --needed base-devel
|
||||||
git clone https://aur.archlinux.org/paru.git --depth=1
|
git clone https://aur.archlinux.org/paru.git --depth=1
|
||||||
@@ -118,7 +123,7 @@ if [ $W_MAIN = "install" ]; then
|
|||||||
./scripts/update
|
./scripts/update
|
||||||
|
|
||||||
printf "%b\n" "${YELLOW}[+]${NC} Installing Dependencies..."
|
printf "%b\n" "${YELLOW}[+]${NC} Installing Dependencies..."
|
||||||
sudo pacman -Sy git tmux fzf tealdeer pass-otp bat ufw unp bash-completion gnome-keyring libsecret reflector
|
sudo pacman -Sy --needed git tmux fzf tealdeer pass-otp bat ufw unp bash-completion gnome-keyring libsecret pacman-contrib reflector arch-audit
|
||||||
|
|
||||||
# Enable GNOME Keyring SSH agent
|
# Enable GNOME Keyring SSH agent
|
||||||
printf "%b\n" "${YELLOW}[+]${NC} Enabling GNOME Keyring SSH agent..."
|
printf "%b\n" "${YELLOW}[+]${NC} Enabling GNOME Keyring SSH agent..."
|
||||||
|
|||||||
@@ -8,11 +8,15 @@ if command -v paru >/dev/null 2>&1; then
|
|||||||
paru
|
paru
|
||||||
printf "%b\n" "${YELLOW}[+]${NC} Removing orphaned dependencies..."
|
printf "%b\n" "${YELLOW}[+]${NC} Removing orphaned dependencies..."
|
||||||
sudo pacman -Rsn $(pacman -Qdtq)
|
sudo pacman -Rsn $(pacman -Qdtq)
|
||||||
|
printf "%b\n" "${YELLOW}[+]${NC} Checking for config changes..."
|
||||||
|
sudo pacdiff
|
||||||
elif command -v pacman >/dev/null 2>&1; then
|
elif command -v pacman >/dev/null 2>&1; then
|
||||||
printf "%b\n" "${YELLOW}[+]${NC} Updating Arch..."
|
printf "%b\n" "${YELLOW}[+]${NC} Updating Arch..."
|
||||||
sudo pacman -Syu
|
sudo pacman -Syu
|
||||||
printf "%b\n" "${YELLOW}[+]${NC} Removing orphaned dependencies..."
|
printf "%b\n" "${YELLOW}[+]${NC} Removing orphaned dependencies..."
|
||||||
sudo pacman -Rsn $(pacman -Qdtq)
|
sudo pacman -Rsn $(pacman -Qdtq)
|
||||||
|
printf "%b\n" "${YELLOW}[+]${NC} Checking for config changes..."
|
||||||
|
sudo pacdiff
|
||||||
elif command -v apt >/dev/null 2>&1; then
|
elif command -v apt >/dev/null 2>&1; then
|
||||||
printf "%b\n" "${YELLOW}[+]${NC} Updating repos..."
|
printf "%b\n" "${YELLOW}[+]${NC} Updating repos..."
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
|||||||
Reference in New Issue
Block a user