1
0
mirror of https://github.com/Foltik/dotfiles synced 2024-11-27 21:19:51 -05:00
dotfiles/lib/path.py

14 lines
292 B
Python

from pathlib import Path
def local_path(*args):
path = Path('./')
for arg in args:
path /= Path(arg)
return path
def deploy_path(path):
start = path.parts[0]
target = path.parts[1:]
if start == 'lain':
return (Path('~') / Path(*target)).expanduser()