diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2009-04-07 20:28:27 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2009-04-07 20:28:27 +0200 |
commit | b8c54d1f1bed345168b17a442dfd91fb68f29dd8 (patch) | |
tree | d51adfa672b2db63abb696a599b16052e17cbdf1 /bashrc | |
parent | 5d5932e76458ecc70b183756579b0890755e4b07 (diff) | |
download | dotfiles-b8c54d1f1bed345168b17a442dfd91fb68f29dd8.tar.gz dotfiles-b8c54d1f1bed345168b17a442dfd91fb68f29dd8.tar.xz dotfiles-b8c54d1f1bed345168b17a442dfd91fb68f29dd8.zip |
update-magic improved
Conflicts:
bashrc/main.sh
Diffstat (limited to 'bashrc')
-rw-r--r-- | bashrc/main.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bashrc/main.sh b/bashrc/main.sh index ad922d4..4a6d48a 100644 --- a/bashrc/main.sh +++ b/bashrc/main.sh @@ -13,10 +13,11 @@ declare -r _BASHRC_DIR="${_DOTFILES_DIR}/bashrc" _self_update() { pushd ${_DOTFILES_DIR} &>/dev/null - if [[ -n "$(git fetch 2>&1)" && $? -eq 0 ]]; then - echo -ne "\033[31m*\033[0m dotfile updates found, merge now? " - - if read; then + git fetch orgin 2>/dev/null + if [[ -n "$(git whatchanged HEAD..origin/master)" ]]; then + echo -ne "\033[31m*\033[0m dotfile updates found, merge now? (Y/n) " + read _merge; + if [[ $_merge != 'n' ]]; then git merge origin/master if [[ -e management/symlinks.md5 ]]; then |