From f72b34f1a7655ed08a706931078224f922ad2fd5 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 2 Oct 2016 23:39:34 +0200 Subject: fix syntax --- hel/recv-media.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hel/recv-media.nix b/hel/recv-media.nix index f0d39bb1..c2223dd8 100644 --- a/hel/recv-media.nix +++ b/hel/recv-media.nix @@ -35,7 +35,10 @@ writeScriptBin "recv-media" '' ( summary=$(ffmpeg -i "''${target}" -f ffmetadata 2>/dev/null | tee /dev/stderr | sed -r '/^title=/!d; s/^title=//') - [[ -n "''${summary}" ]] || { echo "Title is empty, replacing with filename" >&2; summary=$(basename "$1") } + if [[ -z "''${summary}" ]]; then + echo "Title is empty, replacing with filename" >&2 + summary=$(basename "$1") + fi printf "%s\n%s\n" "''${summary}" "" | notify-${notifyUser} -a recv-media || true ) || true '' -- cgit v1.2.3