Added useful scripts

This commit is contained in:
2024-01-03 18:13:29 +00:00
parent 15a0f7dc08
commit 03ed190eb6
2 changed files with 33 additions and 0 deletions

10
scripts/codeAI_ollama.sh Normal file
View File

@@ -0,0 +1,10 @@
#! /bin/bash
ollama=$(pacman -Q ollama)
if [[ -n "$ollama" ]]; then
kgx -e "ollama serve"
sleep 1
kgx -e "ollama run codellama"
else
kgx -e "sudo paru -S ollama; echo 'Run the script again...'"
fi

23
scripts/maintenance.sh Normal file
View File

@@ -0,0 +1,23 @@
#! /bin/bash
echo -e "\e[31m[+] Upgrading Arch...\e[0m"
sudo paru -Syu
echo -e "\e[31m[+] Cleaning orphaned (unneeded) packages...\e[0m"
sudo paru -Rsn $(paru -Qdtq)
echo -e "\e[31m[+] Cleaning old pacman cache...\e[0m"
paccache -rk1
echo -e "\e[31m[+] Removing logs older than 7d...\e[0m"
sudo journalctl --vacuum-time=7d
echo -e "\e[31m[I] Cleaning flatpak...:\e[0m"
flatpak remove --unused
echo -e "\e[31m[I] AUR Packages installed:\e[0m"
pacman -Qim | awk '/^Name/{name=$3} /^Installed Size/{print $4$5, name}' | sort -h
# Installed packages: pacman -Qen
read -p "Press enter to exit."