# HG changeset patch # User Jeff Hammel # Date 1486402179 28800 # Node ID 570ace9ed7c21c4d993f52525c806318b234a96c # Parent 7c2dbd45c34674f10af64f6b3521838dc0505d39 make my life a little easier diff -r 7c2dbd45c346 -r 570ace9ed7c2 bin/syn.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/syn.sh Mon Feb 06 09:29:39 2017 -0800 @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e + +cd + +silvermirror +hg sync +ubuntu_updated.sh +~/bin/mirror-hg http://k0s.org/hg + diff -r 7c2dbd45c346 -r 570ace9ed7c2 bin/ubuntu_updated.sh --- a/bin/ubuntu_updated.sh Tue Jan 31 17:38:05 2017 -0800 +++ b/bin/ubuntu_updated.sh Mon Feb 06 09:29:39 2017 -0800 @@ -1,9 +1,22 @@ #!/bin/bash -# script to see if ubuntu is up to date +set -e + +# script to update ubuntu +# Ref: +# http://mixeduperic.com/ubuntu/how-to-keep-your-ubuntu-server-updated-with-patches-and-security-fixes-using-the-command-line + -# -s = dry run -if apt-get update -y +if sudo apt-get update -y then - apt-get -u -s upgrade + # -s = dry run + # sudo apt-get -u -s -y upgrade + + sudo apt-get -u -y upgrade + + # TODO: sudo apt-get -u -s dist-upgrade + fi + +# cleanup +sudo apt -y autoremove