Skip to content

Commit

Permalink
Merge 20e5977 into 50965dc
Browse files Browse the repository at this point in the history
  • Loading branch information
robbixc committed Jan 15, 2019
2 parents 50965dc + 20e5977 commit 703afe2
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions shallow_backup/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,15 @@ def backup_fonts(backup_path, skip=False):
overwrite_dir_prompt_if_needed(backup_path, skip)
print_blue("Copying '.otf' and '.ttf' fonts...")
fonts_path = get_fonts_dir()
fonts = [quote(os.path.join(fonts_path, font)) for font in os.listdir(fonts_path) if
font.endswith(".otf") or font.endswith(".ttf")]

for font in fonts:
if os.path.exists(font):
copyfile(font, os.path.join(backup_path, font.split("/")[-1]))


if os.path.isdir(fonts_path):
fonts = [quote(os.path.join(fonts_path, font)) for font in os.listdir(fonts_path) if
font.endswith(".otf") or font.endswith(".ttf")]

for font in fonts:
if os.path.exists(font):
copyfile(font, os.path.join(backup_path, font.split("/")[-1]))
else: print_red ('Skipping fonts backup, no fonts directory found')

def backup_all(dotfiles_path, packages_path, fonts_path, configs_path, skip=False):
"""
Complete backup procedure.
Expand Down

0 comments on commit 703afe2

Please sign in to comment.