diff options
Diffstat (limited to 'hel')
-rw-r--r-- | hel/recv-media.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/hel/recv-media.nix b/hel/recv-media.nix new file mode 100644 index 00000000..b61840ec --- /dev/null +++ b/hel/recv-media.nix | |||
@@ -0,0 +1,13 @@ | |||
1 | { stdenv, coreutils, writeScriptBin }: | ||
2 | |||
3 | writeScriptBin "recv-media" '' | ||
4 | #!${stdenv.shell} | ||
5 | |||
6 | [[ -z "$1" ]] && exit 2 | ||
7 | |||
8 | PATH=${coreutils}/bin | ||
9 | |||
10 | dir=/var/media | ||
11 | |||
12 | cp -l "$1" "''${dir}/$(basename "$1")" | ||
13 | '' | ||