mirror of
https://github.com/Foltik/dotfiles
synced 2024-11-28 05:27:06 -05:00
14 lines
277 B
Python
14 lines
277 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)
|