Have the software-install.sh script do 'the lot' and call once per day from .bashrc.
This commit is contained in:
parent
483fd526c8
commit
3063819931
13
.bashrc
13
.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 & )
|
||||
#--------------------------------------------------------------------------------
|
||||
|
||||
#--------------------------------------------------------------------------------
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue