Add comments, Fix path errors, Check if vim folders already exist
This commit is contained in:
parent
3b261cc736
commit
4c8815ad92
@ -51,6 +51,8 @@ class VimModule(IModule):
|
||||
temp_file.write(line)
|
||||
temp_file.close()
|
||||
shutil.move('temp', 'testfile')
|
||||
|
||||
# Merge duplicates to first ocassion with awk
|
||||
sorted_file = "awk -i inplace ' !x[$0]++' ~/Gitlab/linux-tools/testfile"
|
||||
call(sorted_file, shell=True)
|
||||
|
||||
@ -63,11 +65,17 @@ class VimModule(IModule):
|
||||
vimrc_file.write("call plug#end()\n")
|
||||
|
||||
vimdir_exists = os.path.isdir("/home/clay/Gitlab/linux-tools/testdirectory/")
|
||||
autoloaddir_exists = os.path.isdir("/home/clay/Gitlab/linux-tools/testdirectory/autoload/")
|
||||
|
||||
# Create necessary folder structure for Plugin Manager
|
||||
if autoloaddir_exists == False:
|
||||
if vimdir_exists:
|
||||
install_vimplug = "cd ~/Gitlab/linux-tools/testdirectory/ && mkdir autoload && cd autoload && touch test.txt"
|
||||
call(install_vimplug, shell=True)
|
||||
|
||||
else:
|
||||
make_vimdir = "cd ~/Gitlab/linux-tools/ && mkdir testdirectory && cd testdirectory && mkdir autoload && cd autoload && touch test.txt"
|
||||
make_vimdir = """cd ~/Gitlab/linux-tools/ && mkdir testdirectory && cd testdirectory && mkdir autoload &&
|
||||
cd autoload && touch test.txt"""
|
||||
call(make_vimdir, shell=True)
|
||||
else:
|
||||
print("Vim-Plug already installed!")
|
Loading…
Reference in New Issue
Block a user