mirror of
https://github.com/Foltik/dotfiles
synced 2024-11-24 12:26:05 -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)
|