Last active
August 29, 2015 14:24
-
-
Save t-chab/3282f8bd245023b322ce to your computer and use it in GitHub Desktop.
Simple shell script to rebuild and upgrade AUR packages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
PKG_LIST=$(pacman -Qm |awk '{ print $1}' |tr '\n' ' ') | |
WORK_DIR="$(mktemp -d)" | |
for i in $PKG_LIST | |
do | |
echo "Building package $i in $WORK_DIR/$i" | |
cd $WORK_DIR | |
prefix=$(echo ${i:0:2}) | |
url="https://aur.archlinux.org/packages/$prefix/$i/$i.tar.gz" | |
echo "Fetching url $url" | |
curl -o "$i".tar.gz $url | |
tar xvfz "$i.tar.gz" | |
cd "$i" | |
makepkg -s --noconfirm --needed | |
sudo pacman -U "$i"*.tar.xz | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment