if not os.path.exists(fname):
return
+ file = open(fname, 'r')
+ text = file.read()
+ file.close()
+
if fname in ('mailcap', 'mc.ext', 'menu'):
- file = open(fname, 'r')
- text = file.read()
- file.close()
file = open(fname, 'w')
text = text.replace('mplay', 'mplayer')
text = text.replace('mplayerer', 'mplayer')
file.close()
elif fname == 'vimrc':
- file = open('vimrc', 'r')
- text = file.read()
- file.close()
- file = open('vimrc', 'w')
- file.write(text.replace('\033', '<Esc>'))
+ file = open(fname, 'w')
+ text = text.replace('\033', '<Esc>')
+ file.write(text)
file.close()
os.system("""exec gvim -f -c "set filetype=%s" -c ":source %s/dotfile2html.vim" "%s"