scripts/maintenance/aur-restore.sh

20 lines
507 B
Bash
Raw Normal View History

#!/bin/sh
#REPOSITORY=/home/lanxu/Arch/localrepo
REPOSITORY=/var/cache/pacman/localrepo
# This script restores local aur repository after fuckup with cleaning which
# happens way too often for me
#echo "Creating custom repository..."
#sudo install -d $REPOSITORY -o lanxu
repo-add $REPOSITORY/localrepo.db.tar.gz
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 -n
#echo "Done."