summaryrefslogtreecommitdiff
path: root/hel/recv-media.nix
diff options
context:
space:
mode:
authorGregor Kleen <pngwjpgh@users.noreply.github.com>2016-09-30 19:54:38 +0200
committerGregor Kleen <pngwjpgh@users.noreply.github.com>2016-09-30 19:54:38 +0200
commit34a4e7151877c986dce294480c50c446b2a7c73a (patch)
treecd2ece0de95915b1e35b4c0d8b7d5241f049990f /hel/recv-media.nix
parent86324ade28f499762725d2e3c8a3b3b5987dfe83 (diff)
downloadnixos-34a4e7151877c986dce294480c50c446b2a7c73a.tar
nixos-34a4e7151877c986dce294480c50c446b2a7c73a.tar.gz
nixos-34a4e7151877c986dce294480c50c446b2a7c73a.tar.bz2
nixos-34a4e7151877c986dce294480c50c446b2a7c73a.tar.xz
nixos-34a4e7151877c986dce294480c50c446b2a7c73a.zip
ionice recv-media
Diffstat (limited to 'hel/recv-media.nix')
-rw-r--r--hel/recv-media.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/hel/recv-media.nix b/hel/recv-media.nix
index 488f0cca..7f79d65a 100644
--- a/hel/recv-media.nix
+++ b/hel/recv-media.nix
@@ -14,7 +14,8 @@ writeScriptBin "recv-media" ''
14 14
15 dir=/var/media 15 dir=/var/media
16 target="''${dir}"/$(basename "$1") 16 target="''${dir}"/$(basename "$1")
17 tmpFile=$(${coreutils}/bin/mktemp --dry-run --tmpdir=${dir} .recv-media.XXXXXXXXXX)
17 18
18 cp -vn --preserve=all "$1" "''${target}" 19 ${eject}/bin/ionice -c 3 -t cp -vn --preserve=all "$1" ${tmpFile} && mv ${tmpFile} "''${target}"
19 touch -c -m -t "$2" "''${target}" 20 touch -c -m -t "$2" "''${target}"
20'' 21''