summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2009-04-07 20:28:27 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2009-04-07 20:28:27 +0200
commitb8c54d1f1bed345168b17a442dfd91fb68f29dd8 (patch)
treed51adfa672b2db63abb696a599b16052e17cbdf1
parent5d5932e76458ecc70b183756579b0890755e4b07 (diff)
downloaddotfiles-b8c54d1f1bed345168b17a442dfd91fb68f29dd8.tar.gz
dotfiles-b8c54d1f1bed345168b17a442dfd91fb68f29dd8.tar.xz
dotfiles-b8c54d1f1bed345168b17a442dfd91fb68f29dd8.zip
update-magic improved
Conflicts: bashrc/main.sh
-rw-r--r--bashrc/main.sh9
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