#!/bin/sh -e

dir=/home/services/dlna

for file in "$@"; do
    fname=${file##*/}
done

[ -z "$file" ] && exit 1

bfile="$(basename "$file")"

scp "$file" "${host}:$dir"
ssh $host "chmod a+r \"$dir/$bfile\""

echo "Pre-released ${url}/${bfile}"