22 lines
388 B
Bash
22 lines
388 B
Bash
pushd $SCR
|
|
|
|
prefix="&7[&3zshrc&7]"
|
|
|
|
# Check for updates
|
|
git fetch origin
|
|
reslog=$(git log HEAD..origin/master --oneline)
|
|
if [[ "${reslog}" != "" ]] ; then
|
|
|
|
# Has updates
|
|
color "$prefix &cYour zshrc is outdated. Automatically updating..."
|
|
|
|
# Try to pull
|
|
if git pull; then
|
|
color "$prefix &aUpdated!"
|
|
else
|
|
color "$prefix &cUpdate failed!"
|
|
fi
|
|
fi
|
|
|
|
popd
|