Self updating

This commit is contained in:
Christian Colglazier 2019-12-23 19:09:21 -05:00
parent c0ae64ccfb
commit 3b1afd08ec

View File

@ -76,5 +76,18 @@ function dotfiles {
done done
} }
# Check dotfiles for updates
function update {
echo Checking for dotfile updates
startTime=$(date +%s -r $dotdir)
cd $dotdir && git pull
endTime=$(date +%s -r $dotdir)
if (( "$startTime" < "$endTime" )); then
sh $dotdir/scripts/install.sh
exit
fi
}
update
dotfiles dotfiles
emacs emacs