From f950ff90e26ccaf3d4ba32be391601bf15edea74 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/5pkgs/simple/alacritty-tv.nix') diff --git a/tv/5pkgs/simple/alacritty-tv.nix b/tv/5pkgs/simple/alacritty-tv.nix index 7e24b7e..1c7730a 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