changeset 822:570ace9ed7c2

make my life a little easier
author Jeff Hammel <k0scist@gmail.com>
date Mon, 06 Feb 2017 09:29:39 -0800
parents 7c2dbd45c346
children 3b767ffdd55e
files bin/syn.sh bin/ubuntu_updated.sh
diffstat 2 files changed, 28 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- /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
+
--- 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