From f194e71ddab32acf5cef834e87019ef24302e0c0 Mon Sep 17 00:00:00 2001 From: koumakpet Date: Mon, 16 Mar 2020 14:16:28 +0100 Subject: [PATCH] Updated .zshrc oh-my-zsh location file rewrite --- dotfiles_install.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dotfiles_install.py b/dotfiles_install.py index 55e7749..7cc7c61 100644 --- a/dotfiles_install.py +++ b/dotfiles_install.py @@ -45,10 +45,12 @@ def personalized_changes(file): filedata = None with open(file, 'r') as f: filedata = f.read() + filedata_old = filedata filedata = filedata.replace('"$HOME/.config/oh-my-zsh"', f'"{oh_my_zsh_path}"') - Print.err('Rewriting') - with open(file, 'w') as f: - f.write(filedata) + if filedata_old != filedata: + Print.commend('Changing oh-my-zsh location in .zshrc') + with open(file, 'w') as f: + f.write(filedata) def init(symlink):