[~] Refactor
This commit is contained in:
parent
8656b3b985
commit
64706907ca
8
Makefile
8
Makefile
@ -43,6 +43,14 @@ dotfiles_put:
|
||||
cp -rp \
|
||||
dotfiles/.ipython/profile_default/ipython_config.py \
|
||||
~/.ipython/profile_default/ipython_config.py
|
||||
D1=Code\ -\ OSS; \
|
||||
for p in \
|
||||
"dotfiles/.config/$$D1/User/keybindings.json" \
|
||||
"dotfiles/.config/$$D1/User/settings.json"; do \
|
||||
commands install -f -p "dotfiles/.config/$$D1" -s "$$p" -t ~/.config/"$$D1"; \
|
||||
done
|
||||
#commands install -f -p dotfiles -s dotfiles/ -t ~/.config/
|
||||
|
||||
dotfiles_fetch:
|
||||
commands install -f -p ~ -s ~/.config/Code\ -\ OSS/User/keybindings.json -t dotfiles
|
||||
commands install -f -p ~ -s ~/.config/Code\ -\ OSS/User/settings.json -t dotfiles
|
||||
|
6
dotfiles/.config/Code - OSS/User/settings.json
Normal file
6
dotfiles/.config/Code - OSS/User/settings.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"editor.wordWrap": "on",
|
||||
"editor.minimap.autohide": true,
|
||||
"editor.minimap.maxColumn": 80,
|
||||
"editor.minimap.size": "fit"
|
||||
}
|
@ -3746,17 +3746,30 @@ def install(argv: list[str]) -> None:
|
||||
if not options.overwrite:
|
||||
raise NotImplementedError
|
||||
|
||||
shutil.rmtree(str(final_target))
|
||||
if final_target.is_dir():
|
||||
shutil.rmtree(final_target)
|
||||
else:
|
||||
os.unlink(final_target)
|
||||
|
||||
if options.source.is_dir() and not options.recursive:
|
||||
raise NotImplementedError
|
||||
|
||||
os.makedirs(final_target, exist_ok=True,)
|
||||
if options.source.is_dir():
|
||||
os.makedirs(final_target, exist_ok=True,)
|
||||
else:
|
||||
os.makedirs(final_target.parent, exist_ok=True,)
|
||||
|
||||
shutil.copy(
|
||||
options.source,
|
||||
final_target,
|
||||
)
|
||||
subprocess.check_call([
|
||||
'cp', '-rp',
|
||||
str(options.source),
|
||||
'-T',
|
||||
str(final_target),
|
||||
])
|
||||
|
||||
#shutil.copy(
|
||||
# options.source,
|
||||
# final_target.parent,
|
||||
#)
|
||||
|
||||
logger.info(dict(msg='done'))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user