scripts/aur-restore.sh
2019-12-15 17:31:59 +02:00

18 lines
441 B
Bash
Executable File

#!/bin/sh
# This script restores local aur repository after fuckup with cleaning which
# happens way too often for me
echo "Creating custom repository..."
sudo install -d /var/cache/pacman/custom -o lanxu
repo-add /var/cache/pacman/custom/custom.db.tar
aur sync -u
echo "Retrieving aur packages which are installed..."
pacman -Qm | cut -f 1 -d " " > aur-packages.txt
echo "Installing..."
xargs -a aur-packages.txt aur sync
echo "Done."