{ stdenv, coreutils, writeScriptBin }: writeScriptBin "recv-media" '' #!${stdenv.shell} [[ -z "$1" ]] && exit 2 PATH=${coreutils}/bin dir=/var/media cp -ln "$1" "''${dir}/$(basename "$1")" [[ -n "$2" ]] && touch -c -d "$(print "$2" | tr '_' ' ')" "''${dir}/$(basename "$1")" ''