From 3952e9973d560d46217b2c76f3aa9b52ced457e0 Mon Sep 17 00:00:00 2001 From: Mika Suomalainen Date: Mon, 24 Dec 2012 19:15:02 +0200 Subject: [PATCH] bashrc & zshc & xsessionrc: Set update interval to 1 day on Mac. Fixes #13 --- bashrc | 6 ++++++ xsessionrc | 6 ++++++ zshrc | 7 +++++++ 3 files changed, 19 insertions(+) diff --git a/bashrc b/bashrc index b9ea0828..f9b2dbe0 100644 --- a/bashrc +++ b/bashrc @@ -192,6 +192,12 @@ if [ $UNAME = "Darwin" ]; then defaults write com.apple.finder AppleShowAllFiles TRUE && defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1 fi +# If we are on Mac, set update check interval to 1 day +if [[ $UNAME = "Darwin" && $USER = "root" ]]; then + defaults write /Library/Preferences/com.apple.SoftwareUpdate ScheduleFrequency 1 +fi +# The above requires at least Mountain Lion. + ##### Aliases RJ706I ##### # To get sudo work with aliases. diff --git a/xsessionrc b/xsessionrc index e030cfae..0cb5c2f6 100644 --- a/xsessionrc +++ b/xsessionrc @@ -9,6 +9,12 @@ if [ $UNAME = "Darwin" ]; then defaults write com.apple.finder AppleShowAllFiles TRUE && defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1 fi +# If we are on Mac, set update check interval to 1 day +if [[ $UNAME = "Darwin" && $USER = "root" ]]; then + defaults write /Library/Preferences/com.apple.SoftwareUpdate ScheduleFrequency 1 +fi +# The above requires at least Mountain Lion. + # Use gpg-agent eval $(gpg-agent --daemon) diff --git a/zshrc b/zshrc index 3888f7d4..47b8f7c2 100644 --- a/zshrc +++ b/zshrc @@ -122,6 +122,13 @@ if [ $UNAME = "Darwin" ]; then defaults write com.apple.finder AppleShowAllFiles TRUE && defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1 fi +# If we are on Mac, set update check interval to 1 day +if [[ $UNAME = "Darwin" && $USER = "root" ]]; then + defaults write /Library/Preferences/com.apple.SoftwareUpdate ScheduleFrequency 1 +fi +# The above requires at least Mountain Lion. + + ##### Aliases RJ706I ##### # To get sudo work with aliases.