mirror of
https://github.com/chenasraf/dotfiles.git
synced 2026-05-18 01:29:06 +00:00
fix(motd): git remote compare
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
echo '"There is never enough time to do all the nothing you want."'
|
||||
echo
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
|
||||
source "$HOME/.dotfiles/plugins/colors.plugin.zsh"
|
||||
|
||||
# update repo
|
||||
git -C $HOME/.dotfiles remote update
|
||||
local=$(git -C $HOME/.dotfiles rev-parse HEAD)
|
||||
remote=$(git -C $HOME/.dotfiles rev-parse @{u})
|
||||
|
||||
if [[ ! -z $(git -C $HOME/.dotfiles status -uno) ]]; then
|
||||
echo_yellow "You have home updates waiting to be pulled.\nUse \`hli\` to pull & install the changes."
|
||||
if [[ $local != $remote ]]; then
|
||||
echo_yellow "You have home updates waiting to be pulled/pushed."
|
||||
echo_yellow "Use \`hp\` to push the local changes, or \`hli\` to pull & install the remote changes."
|
||||
echo_yellow "Git status:\n"
|
||||
git -C $HOME/.dotfiles status
|
||||
echo
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user