Skip to content

Instantly share code, notes, and snippets.

@bjcubsfan
Created March 10, 2015 16:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bjcubsfan/cd975cf547cc0e6881f1 to your computer and use it in GitHub Desktop.
Save bjcubsfan/cd975cf547cc0e6881f1 to your computer and use it in GitHub Desktop.
The script I use to upgrade arch linux once a month
#!/usr/bin/env zsh
print -n "Does the new linux and zfs-git use the same kernel verision?
https://www.archlinux.org/packages/core/x86_64/linux/
https://aur.archlinux.org/packages/zfs-git/
"
read -q REPLY
if [[ $REPLY == "y" ]] ; then
set -x
TODAY=$(date --iso-8601)
sudo etckeeper pre-install
gvim /home/bpotter/notes/arch_upgrades/${TODAY}_arch_upgrade.md&
sudo pacman -Rs zfs-git spl-git zfs-utils-git
yaourt -Syua
yaourt -Sa zfs-git spl-git zfs-utils-git
# Clean out anything but last 3 from cache
sudo paccache -r
sudo pacman -Qqe > /etc/pacman.d/bjp_installed_pkglist.txt
sudo etckeeper post-install
else
echo "
Wait until they match, then upgrade."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment