diff --git a/.bashrc b/.bashrc index eba39af..b59b495 100755 --- a/.bashrc +++ b/.bashrc @@ -133,18 +133,9 @@ fi #-------------------------------------------------------------------------------- #-------------------------------------------------------------------------------- -# Update brew if it's older than one day +# Update software if it's been longer than one day #-------------------------------------------------------------------------------- -if [ -x /usr/local/bin/brew ]; then - export HOMEBREW_GITHUB_API_TOKEN=$(getkey HOMEBREW_GITHUB_API_TOKEN) - ( - find /usr/local/.git -name FETCH_HEAD -mtime +0 -exec \ - bash -c "echo \"--Start: $(date)\"; \ - brew update; \ - echo \"--End: $(date)\"" \ - \; >> ~/var/log/brew-update.log 2>&1 & - ) -fi +( find ~/var/log -name update.log -mtime +0 -exec ~/bin/software-install.sh \; >> ~/var/log/update.log 2>&1 & ) #-------------------------------------------------------------------------------- #-------------------------------------------------------------------------------- diff --git a/bin/software-install.sh b/bin/software-install.sh index ddbbe6e..5408c4c 100755 --- a/bin/software-install.sh +++ b/bin/software-install.sh @@ -38,6 +38,12 @@ function install_osx_software { fi #------------------------------- + #------------------------------- + # Update Brew formulae if older than 24 hours + #------------------------------- + find /usr/local/.git -name FETCH_HEAD -mtime +0 -exec brew update \; + #------------------------------- + #------------------------------- # Install the basics #------------------------------- @@ -98,6 +104,10 @@ function install_osx_software { #------------------------------- } +echo "#-------------------------------" +echo "# START: $(date)" +echo "#-------------------------------" + #------------------------------- # Check for Mac OS X #------------------------------- @@ -111,7 +121,12 @@ fi #------------------------------- # Ensure Vim plugins are up-to-date #------------------------------- -vim +PluginInstall +PluginUpdate +qall +vim -T dumb +PluginInstall! +PluginClean! +qall 2>/dev/null |\ + sed -E s/'\[[0-9]{1,2};[0-9]{1,2}[mKH]'//g #------------------------------- +echo "#-------------------------------" +echo "# END: $(date)" +echo "#-------------------------------" + exit 0