Skip to content

Instantly share code, notes, and snippets.

@jeffsharpe
Last active August 29, 2015 13:56
Show Gist options
  • Select an option

  • Save jeffsharpe/9022950 to your computer and use it in GitHub Desktop.

Select an option

Save jeffsharpe/9022950 to your computer and use it in GitHub Desktop.
update-arch-packages.sh
#!/usr/bin/env bash
if [ -x "/usr/bin/reflector" ]; then
DATE=`date +%Y%m%d`
sudo cp -f /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.${DATE}
sudo reflector --sort rate --protocol http --fastest 5 --age 36 --save /etc/pacman.d/mirrorlist
fi
sudo pacman -Syyu
if [ -x "/usr/bin/aurget" ]; then
mkdir -p $HOME/Temporary/
cd $HOME/Temporary
aurget -Syu --builddir $HOME/Temporary --deps --noedit
cd $HOME
fi
echo $0: Finished processing!
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment