mirror of
https://github.com/xHyroM/dotfiles.git
synced 2024-09-19 20:23:20 +02:00
18 lines
490 B
Python
18 lines
490 B
Python
from glob import glob
|
|
from os.path import expanduser, isdir
|
|
from os import mkdir
|
|
from shutil import copy2
|
|
import shutil
|
|
|
|
def dump(stuff: list[str]):
|
|
for pattern in stuff:
|
|
expand = expanduser(pattern)
|
|
|
|
for path in glob(expand, recursive=True):
|
|
normalized_path = path.removeprefix(expanduser("~/"))
|
|
if isdir(normalized_path):
|
|
mkdir(normalized_path)
|
|
else:
|
|
shutil.copy2(path, normalized_path)
|
|
|
|
exit(1)
|