[+] Early includes

This commit is contained in:
2025-10-15 17:30:09 +08:00
parent 8f9185b8f7
commit 99dd70eae3
2 changed files with 3 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
spushd $SCR
prefix="&7[&3zshrc&7]"
# Check for updates
git fetch origin --quiet
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 stash & git pull & git stash pop; then
. $SCR/zshrc.sh
color "$prefix &aUpdated!"
else
color "$prefix &cUpdate failed!"
fi
fi
spopd