summaryrefslogtreecommitdiffstats
path: root/tv/5pkgs/simple
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2023-01-17 00:42:15 +0100
committertv <tv@krebsco.de>2023-01-18 17:23:38 +0100
commit29c8c3ecf1cc66a638020a564e1b72966c259a8b (patch)
tree7cb35f8905e6b95594bc4453a3b60d4f6efd0f5e /tv/5pkgs/simple
parent70472d8c45caba8df6f57b43cec686e4df459135 (diff)
tv alacritty: admit missing ref file
Diffstat (limited to 'tv/5pkgs/simple')
-rw-r--r--tv/5pkgs/simple/alacritty-tv.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/tv/5pkgs/simple/alacritty-tv.nix b/tv/5pkgs/simple/alacritty-tv.nix
index 7e24b7e1b..1c7730a71 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