From bba00f87fd5460e394fc20252732647e301a67ff Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 15 May 2016 23:18:09 +0200 Subject: video over uucp --- hel/recv-media.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 hel/recv-media.nix (limited to 'hel') diff --git a/hel/recv-media.nix b/hel/recv-media.nix new file mode 100644 index 00000000..f85598f4 --- /dev/null +++ b/hel/recv-media.nix @@ -0,0 +1,22 @@ +{ stdenv, coreutils, ffmpeg-full writeScriptBin }: + +writeScriptBin "recv-media" '' + #!${stdenv.shell} + + PATH=${ffmpeg-full}/bin:${coreutils}/bin + + dir=/var/media + + file="''${dir}/.$(basename "$1")" + file2="''${dir}/.copy.$(basename "$1")" + nFile="''${dir}/$(basename "$1")" + cat > "''${file}" + if ! ffmpeg -v warning -i "''${file}" -c copy "''${file2}" 2>&1