From 58152369f9db457c6f9a542e32ae6efccb746897 Mon Sep 17 00:00:00 2001 From: Nathan Shelly Date: Sun, 18 Oct 2020 18:04:47 -0700 Subject: [PATCH] clean up & comment out backup --- infra/setup/bin/backup_file | 3 ++- infra/setup/bin/setup_nix | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/infra/setup/bin/backup_file b/infra/setup/bin/backup_file index 3b62026e7..051dd4d6c 100755 --- a/infra/setup/bin/backup_file +++ b/infra/setup/bin/backup_file @@ -13,9 +13,10 @@ source "$DOTFILES/infra/scripts/prompts.sh" # - {string} [extension = bak] - extension of created file, default of bak backup_file() { # parameters - local src="$1" ext="$2" + local src="$1" ext="${2:-bak}" [ -f "$src" ] && { + # TODO: conditionally use sudo here sudo mv "$src" "$src.$ext" } } diff --git a/infra/setup/bin/setup_nix b/infra/setup/bin/setup_nix index d3b2badbe..8bf67d698 100755 --- a/infra/setup/bin/setup_nix +++ b/infra/setup/bin/setup_nix @@ -172,13 +172,13 @@ maybe_install_nix_darwin() { nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer - backup_default_system_files + # backup_default_system_files # TODO: handle interactive prompts, pass flags to answer questions? source "${TMPDIR}/result/bin/darwin-installer" || { fail '`nix-darwin` installer failed. Please fix any issues and try again.' - restore_default_system_files + # restore_default_system_files return 1 }