-
Notifications
You must be signed in to change notification settings - Fork 1
/
update_mac.py
68 lines (57 loc) · 1.53 KB
/
update_mac.py
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
from pyinfra.operations import brew, git, server
from common import home_path_str, notes_path_str, personal_projects_path_str
def update_mac_using_brew():
"""
Update brew so I have all brand new deps every day.
"""
brew.update()
brew.upgrade()
brew.cask_upgrade()
def update_nvim():
"""
Here I update Lazy and MasonTools.
Gladly nvim support command-line mode.
"""
server.shell([
'nvim --headless "+Lazy! sync" +qa'
])
server.shell([
'nvim --headless "+MasonToolsUpdateSync" +qa'
])
def update_local_repos():
"""
Updates my local repos
"""
git.repo(
src="git@github.com:IlyasYOY/obs.nvim.git",
dest=f"{personal_projects_path_str}/obs.nvim",
pull=True,
)
git.repo(
src="git@github.com:IlyasYOY/coredor.nvim.git",
dest=f"{personal_projects_path_str}/coredor.nvim",
pull=True,
)
git.repo(
src="git@github.com:IlyasYOY/git-link.nvim.git",
dest=f"{personal_projects_path_str}/git-link.nvim",
pull=True,
)
git.repo(
src="git@github.com:IlyasYOY/Notes.git",
dest=notes_path_str,
pull=True
)
git.repo(
src="git@github.com:IlyasYOY/dotfiles.git",
dest=f"{personal_projects_path_str}/dotfiles",
pull=True,
)
def update_tmux_plugins():
server.shell(commands=[
f'{home_path_str}/.tmux/plugins/tpm/bin/update_plugins all',
])
update_mac_using_brew()
update_local_repos()
update_tmux_plugins()
update_nvim()