diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2009-02-03 17:18:54 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2009-02-03 17:18:54 +0100 |
commit | 67a3d160f29d647356ecb3c2c3d71da5673b967c (patch) | |
tree | 475ed26dd214a133167fb6c61a70bedde4ff896b /bashrc | |
parent | 3d56311689301442d6875b150a1c2a6fb1c404ee (diff) | |
download | dotfiles-67a3d160f29d647356ecb3c2c3d71da5673b967c.tar.gz dotfiles-67a3d160f29d647356ecb3c2c3d71da5673b967c.tar.xz dotfiles-67a3d160f29d647356ecb3c2c3d71da5673b967c.zip |
created godot.sh, symlink-mapping
Diffstat (limited to 'bashrc')
-rw-r--r-- | bashrc/main.sh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/bashrc/main.sh b/bashrc/main.sh index eb17f58..457fb6a 100644 --- a/bashrc/main.sh +++ b/bashrc/main.sh @@ -11,10 +11,22 @@ _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? " +q echo -ne "\033[31m*\033[0m dotfile updates found, merge now? " if read; then git merge origin/master + + if [{ -e management/symlinks.md5 ]]; then + md5sum -c management/symlinks.md5 2>/dev/null + + if [[ $? -ne 0 ]]; then + echo -e "\033[33m*\033[0m symlink mapping changed! Maybe you should execute godot.sh again..." + fi + else + echo -e "\033[33m*\033[0m symlink mapping checksum not found" + fi + md5sum symlink-mapping > management/symlinks.md5 + popd &>/dev/null exec $SHELL fi |