diff options
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 |