summaryrefslogtreecommitdiff
path: root/pack/ache/start/updatePlugin.py
blob: 2a8a49692f040e08ef1ed6963aacf01c78744976 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/env python

import subprocess
from pathlib import Path


for plugin in Path('.').iterdir():
    if (plugin / ".git").exists():
        ret = subprocess.run(["git", "pull"], cwd=str(plugin))

        if ret.returncode != 0:
            print(f"Error updating {plugin}")
            continue

        # The option --init is necessery if there is new submodule
        ret = subprocess.run(["git", "submodule", "update", "--init", "--recursive"], cwd=str(plugin))
        if ret.returncode != 0:
            print(f"Error updating {plugin}")

# Post install script

subprocess.run(["make", "hexokinase"], cwd="vim-hexokinase")
print('Post install Hexakinase done ✔️')

installCmd = "+:CocUpdate"
subprocess.run(["nvim", installCmd])
print('Coc plugins update done ✔️')

print("Please check health 🏥")
subprocess.run(["nvim", "+:checkhealth"])