From cbcc1e432846f2c88215b123428867a3ec035467 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 15 Jul 2015 23:14:20 +0200 Subject: cp should overwrite existing symlinks --- custom/dotfiles.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'custom/dotfiles.nix') diff --git a/custom/dotfiles.nix b/custom/dotfiles.nix index 305794da..f96675e1 100644 --- a/custom/dotfiles.nix +++ b/custom/dotfiles.nix @@ -18,7 +18,7 @@ let cd ${dotfiles} ${findutils}/bin/find . -type d -print0 | ${findutils}/bin/xargs -0 -I '{}' -- ${coreutils}/bin/install -o ${name.owner} -g ${name.group} -d "${name.dir}/{}" ${findutils}/bin/find . -type f \( -not -path './.config/systemd/*' \) -print0 | ${findutils}/bin/xargs -0 -I '{}' -- ln -s -f "${dotfiles}/{}" "${name.dir}/{}" - ${findutils}/bin/find . -type f \( -path './.config/systemd/*' \) -print0 | ${findutils}/bin/xargs -0 -I '{}' -- cp -f "${dotfiles}/{}" "${name.dir}/{}" + ${findutils}/bin/find . -type f \( -path './.config/systemd/*' \) -print0 | ${findutils}/bin/xargs -0 -I '{}' -- cp --remove-destination "${dotfiles}/{}" "${name.dir}/{}" ${findutils}/bin/find . -type f -print0 | ${findutils}/bin/xargs -0 -I '{}' -- chown -h "${name.owner}:${name.group}" "${name.dir}/{}" ''; }; -- cgit v1.2.3