summaryrefslogtreecommitdiff
path: root/hel
diff options
context:
space:
mode:
authorGregor Kleen <pngwjpgh@users.noreply.github.com>2016-10-02 23:39:34 +0200
committerGregor Kleen <pngwjpgh@users.noreply.github.com>2016-10-02 23:39:34 +0200
commitf72b34f1a7655ed08a706931078224f922ad2fd5 (patch)
tree07aa32f7563f84ca95e47b976a135f406dfda827 /hel
parent223b3df5a5eeeb72f36a72abe58de8b10908e60c (diff)
downloadnixos-f72b34f1a7655ed08a706931078224f922ad2fd5.tar
nixos-f72b34f1a7655ed08a706931078224f922ad2fd5.tar.gz
nixos-f72b34f1a7655ed08a706931078224f922ad2fd5.tar.bz2
nixos-f72b34f1a7655ed08a706931078224f922ad2fd5.tar.xz
nixos-f72b34f1a7655ed08a706931078224f922ad2fd5.zip
fix syntax
Diffstat (limited to 'hel')
-rw-r--r--hel/recv-media.nix5
1 files changed, 4 insertions, 1 deletions
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" ''
35 35
36 ( 36 (
37 summary=$(ffmpeg -i "''${target}" -f ffmetadata 2>/dev/null | tee /dev/stderr | sed -r '/^title=/!d; s/^title=//') 37 summary=$(ffmpeg -i "''${target}" -f ffmetadata 2>/dev/null | tee /dev/stderr | sed -r '/^title=/!d; s/^title=//')
38 [[ -n "''${summary}" ]] || { echo "Title is empty, replacing with filename" >&2; summary=$(basename "$1") } 38 if [[ -z "''${summary}" ]]; then
39 echo "Title is empty, replacing with filename" >&2
40 summary=$(basename "$1")
41 fi
39 printf "%s\n%s\n" "''${summary}" "" | notify-${notifyUser} -a recv-media || true 42 printf "%s\n%s\n" "''${summary}" "" | notify-${notifyUser} -a recv-media || true
40 ) || true 43 ) || true
41'' 44''