Blacken deploy.py
This commit is contained in:
20
deploy.py
20
deploy.py
@@ -8,19 +8,19 @@ dotdir = Path(__file__).parent.resolve().absolute()
|
|||||||
|
|
||||||
simple = [
|
simple = [
|
||||||
# 'gemrc',
|
# 'gemrc',
|
||||||
'gitconfig',
|
"gitconfig",
|
||||||
'ideavimrc',
|
"ideavimrc",
|
||||||
'lein',
|
"lein",
|
||||||
# 'irbrc',
|
# 'irbrc',
|
||||||
# 'nethackrc',
|
# 'nethackrc',
|
||||||
# 'spacemacs',
|
# 'spacemacs',
|
||||||
'tmux.conf',
|
"tmux.conf",
|
||||||
'vimrc'
|
"vimrc",
|
||||||
]
|
]
|
||||||
|
|
||||||
targeted = {
|
targeted = {
|
||||||
'doom': '.doom.d',
|
"doom": ".doom.d",
|
||||||
'fish': '.config/fish',
|
"fish": ".config/fish",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -29,7 +29,9 @@ def deploy(source_name, target_name, dry_run=False):
|
|||||||
target = home.joinpath(target_name)
|
target = home.joinpath(target_name)
|
||||||
|
|
||||||
if not source.exists():
|
if not source.exists():
|
||||||
raise FileNotFoundError(f"Asked to link {source_name}, which doesn't exist in {dotdir}.")
|
raise FileNotFoundError(
|
||||||
|
f"Asked to link {source_name}, which doesn't exist in {dotdir}."
|
||||||
|
)
|
||||||
|
|
||||||
if target.exists():
|
if target.exists():
|
||||||
if target.samefile(source):
|
if target.samefile(source):
|
||||||
@@ -61,7 +63,7 @@ def main(dry_run=True):
|
|||||||
deploy(source, target, dry_run=dry_run)
|
deploy(source, target, dry_run=dry_run)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == "__main__":
|
||||||
try:
|
try:
|
||||||
main(False)
|
main(False)
|
||||||
except FileNotFoundError as e:
|
except FileNotFoundError as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user