From 8d366b43b611ab8eab40b214ff32fb7298926880 Mon Sep 17 00:00:00 2001 From: Nathan Shelly Date: Mon, 30 Nov 2020 22:16:44 -0800 Subject: [PATCH] respect headless mode in `link_file` --- infra/setup/bin/link_file | 3 +++ infra/setup/bin/symlink | 5 ----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/infra/setup/bin/link_file b/infra/setup/bin/link_file index f0f003204..d43dafa2b 100755 --- a/infra/setup/bin/link_file +++ b/infra/setup/bin/link_file @@ -22,6 +22,9 @@ link_file() { local overwrite='' backup='' skip='' action='' local overwrite_all=false backup_all=false skip_all=false + # accept existing files silently when running headless + [[ -z $DOTFILES_SETUP_HEADLESS ]] || skip_all=true + if [ -f "$dst" ] || [ -d "$dst" ] || [ -L "$dst" ]; then if [ "$overwrite_all" == "false" ] \ && [ "$backup_all" == "false" ] \ diff --git a/infra/setup/bin/symlink b/infra/setup/bin/symlink index f8f5d80b5..967f7cbc4 100755 --- a/infra/setup/bin/symlink +++ b/infra/setup/bin/symlink @@ -11,11 +11,6 @@ main() { header "<< Symlinking >>" - local overwrite_all=false backup_all=false skip_all=false - - # accept existing files silently when running headless - [[ -z $DOTFILES_SETUP_HEADLESS ]] || skip_all=true - [[ $INSTALL_GUI_SYMLINKS == true ]] && link_gui_files return 0