if __name__ == "__main__": # We have to authenticate here so that Authentication can use the sudo # password while installing packages. If we don't authenticate here, the # message telling the user to enter their sudo password may get overwritten # by the Halo spinner. with Authentication(): pass setup_logging(LOG_FILE, logging.INFO) file( "~/.gitconfig", "gitconfig.template", load_vars=lambda: { 'fullname': CLI.get_full_name(), 'email': CLI.get_email() } ) backup_time = datetime.datetime.now().strftime("%Y.%m.%d.%H.%M.%S") backup_dir = os.path.join( HOME, os.path.join(".dotfiles_backup", backup_time) ) bot("Installing top-level dotfiles") create_symlinks( os.path.join(ROOT, "homedir"), HOME, backup_dir ) bot("Installing .config dotfiles") ensure_directory(os.path.join(HOME, ".config")) create_symlinks( os.path.join(ROOT, "config"), os.path.join(HOME, ".config"), backup_dir
link(original, target, backup_dir) if __name__ == "__main__": # We have to authenticate here so that Authentication can use the sudo # password while installing packages. If we don't authenticate here, the # message telling the user to enter their sudo password may get overwritten # by the Halo spinner. with Authentication(): pass setup_logging(LOG_FILE, logging.INFO) file("~/.gitconfig", "gitconfig.template", load_vars=lambda: { 'fullname': CLI.get_full_name(), 'email': CLI.get_email() }) backup_time = datetime.datetime.now().strftime("%Y.%m.%d.%H.%M.%S") backup_dir = os.path.join(HOME, os.path.join(".dotfiles_backup", backup_time)) bot("Installing top-level dotfiles") create_symlinks(os.path.join(ROOT, "homedir"), HOME, backup_dir) bot("Installing .config dotfiles") ensure_directory(os.path.join(HOME, ".config")) create_symlinks(os.path.join(ROOT, "config"), os.path.join(HOME, ".config"), backup_dir) # This must go after we install .config dotfiles so the symlink to the # nvim directory has been created before we render the template. file("~/.config/nvim/init.vim",