mirror of
https://github.com/Foltik/dotfiles
synced 2024-11-30 14:32:08 -05:00
14 lines
292 B
Python
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()
|