From 29c8c3ecf1cc66a638020a564e1b72966c259a8b Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 17 Jan 2023 00:42:15 +0100 Subject: tv alacritty: admit missing ref file --- tv/5pkgs/simple/alacritty-tv.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tv') diff --git a/tv/5pkgs/simple/alacritty-tv.nix b/tv/5pkgs/simple/alacritty-tv.nix index 7e24b7e1..1c7730a7 100644 --- a/tv/5pkgs/simple/alacritty-tv.nix +++ b/tv/5pkgs/simple/alacritty-tv.nix @@ -101,7 +101,8 @@ let # rust-xdg requires XDG_RUNTIME_DIR to be secure: # https://docs.rs/xdg/2.4.1/src/xdg/lib.rs.html#311 ${pkgs.coreutils}/bin/mkdir -m 0700 -p "$HOME" - if test "$(${pkgs.coreutils}/bin/cat "$HOME"/ref)" != ${config-file}; then + ref=$(! test -e "$HOME"/ref || ${pkgs.coreutils}/bin/cat "$HOME"/ref) + if test "$ref" != ${config-file}; then echo ${config-file} > "$HOME"/ref ${pkgs.coreutils}/bin/cp ${config-file} "$HOME"/.alacritty.yml fi -- cgit v1.2.3